Repository navigation
feat(Flag Dependency): Evaluate flags that depend on other flags - #240
Open
linear-code[bot] wants to merge 2 commits into
Open
linear-code[bot] wants to merge 2 commits into
linear-code[bot] wants to merge 2 commits into
Conversation
Port flagsmith-engine's flag dependency support: segment conditions on `$.flags.<feature>.enabled`, `.value` and `.variant` read the evaluated result of another flag, resolved lazily and transitively. Flags caught in a dependency cycle are served with reason `ERROR; code=CIRCULAR_DEPENDENCY`, and client-supplied `$.flags` are ignored. Flag results now carry the selected multivariate `variant`, and engine-test-data is bumped to v3.11.0, the first release with flag dependency cases. Generated with [Linear](https://linear.app/flagsmith/agent-session/5657b1da-28c2-4081-a075-cae660cc325b) Co-authored-by: linear-code[bot] <222613912+linear-code[bot]@users.noreply.github.com>
Contributor
|
Why are there no unit tests in this PR? |
…the context Generated with [Linear](https://linear.app/flagsmith/agent-session/5657b1da-28c2-4081-a075-cae660cc325b) Co-authored-by: linear-code[bot] <222613912+linear-code[bot]@users.noreply.github.com>
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With local evaluation, the Java SDK can now serve a segment override that depends on another flag, the same way flagsmith-engine does for the Edge API. Until now, a condition such as
$.flags.<feature>.enablednever matched in the Java SDK, so those overrides were silently skipped.Changes
enabled,valueorvariant, including chains of dependencies.ERROR; code=CIRCULAR_DEPENDENCY.variantthe identity was bucketed into.Out of scope: engine-test-data v3.12.x also expects the
STATICreason (flagsmith-engine#347), which is a separate change. On v3.12.1, the only failures are 118 cases whosereasondiffers.Contributes to SDK-4
Review effort: 3/5