test(evaluators): add nested $ref resolution scenarios#343
test(evaluators): add nested $ref resolution scenarios#343
Conversation
Adds @evaluator-ref-edge-cases tagged scenarios covering: - Tags existing 'Evaluator reuse' scenario with @evaluator-refs - Adds nested $ref: evaluator 'is_privileged' references 'is_ballmer' to verify recursive resolution works correctly - Tests that nested resolution via different context paths both work Addresses: open-feature/flagd#1875 Signed-off-by: Simon Schrottner <simon.schrottner@dynatrace.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request expands the test suite for flag evaluation by introducing scenarios that validate nested Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request successfully introduces nested $ref resolution scenarios, addressing the issue described in flagd#1875. The evaluator-refs.json file correctly defines the new nested-ref-targeted-flag and the is_privileged evaluator, which leverages a nested $ref to is_ballmer. The targeting.feature file includes a new scenario, "Nested evaluator ref resolution," with comprehensive examples that validate the expected behavior for different context inputs. The addition of @evaluator-refs and @evaluator-ref-edge-cases tags also improves test organization. Overall, the changes are well-implemented and provide good test coverage for the new functionality.
|
relates too open-feature/flagd#1875 |
Summary
Adds
@evaluator-refsand@evaluator-ref-edge-casestagged scenarios totargeting.featurecovering recursive$refresolution from flagd#1875.New Tags
@evaluator-refs— added to the existing basic evaluator reuse scenario (previously untagged)@evaluator-ref-edge-cases— for the new nested resolution scenarioChanges
Existing scenario tagged
The existing "Evaluator reuse" scenario now has
@evaluator-refsso SDK implementations can explicitly opt in.New: Nested $ref resolution (
nested-ref-targeted-flag)A new
is_privilegedevaluator inevaluator-refs.jsonreferencesis_ballmervia$ref:The
nested-ref-targeted-flaguses$ref: is_privileged, requiring two levels of resolution. Tests:email = ballmer@macrosoft.comrole = adminemail = other@example.comRelated