fix(Dependencies): Dependency overrides serve a stale value while the prerequisite is off - #8669
Ishita-Singh-12 wants to merge 5 commits into
Conversation
|
@Ishita-Singh-12 is attempting to deploy a commit to the Flagsmith Team on Vercel. A member of the Team first needs to authorize it. |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (4)
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughDependency segment overrides now use the corresponding environment default feature state as the source of the emitted value and multivariate allocations in both evaluation-context and engine mappings. Other system segment overrides continue to use their own values. The change adds a service function to identify dependency segment IDs and adds unit tests for both mapping paths. Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to The dependency override mapping is mergeable after normal checks; no unresolved issue was established that requires a fix before merge. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The change is bounded to dependency override values. Environment scoping, prerequisite gating, override identity and precedence are preserved. No introduced security weakness was established, but consistency during concurrent edits and cached or replicated reads remains incompletely verified. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
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 |
Thanks for submitting a PR! Please check the boxes below:
docs/if required so people know about the feature.Changes
Contributes to #8628
A dependency override keeps the value and variants the feature had when the dependency was created. While the prerequisite isn't enabled, SDKs serve that stale value.
enabled, priority and metadata still come from the override.map_environment_to_evaluation_contextandmap_environment_to_enginedo this, using the newget_dependency_segment_idsto find the segments. It matches system segments owned by a feature that have flag references, so experiment rollout segments are left alone.Not in this PR: showing the value as inherited in the admin UI. There is no UI for dependencies on
mainyet, so that would go with the Dependencies tab.How did you test this code?
Added
tests/unit/features/dependencies/test_overrides.py, which covers both mappers:main.main.Ran the full unit suite and the integration suite. Two feature lifecycle tests error here because they need an InfluxDB service.
ruffandmypyare clean.