Skip to content

fix(Flag Dependency): Serve dependency overrides' value from the environment default - #8793

Open
khvn26 wants to merge 5 commits into
mainfrom
fix/dependency-overrides-inherit-default
Open

khvn26 wants to merge 5 commits into
mainfrom
fix/dependency-overrides-inherit-default

Conversation

@khvn26

@khvn26 khvn26 commented Oct 15, 2026 •

Copy link
Copy Markdown
Member
  • I have read the Contributing Guide.
  • I have added information to docs/ if required so people know about the feature.
  • I have filled in the "Changes" section below.
  • I have filled in the "How did you test this code" section below.

Changes

Closes #8628

In this PR, when preparing environment documents / evaluation contexts, we pick up the feature value for dependency overrides from the current environment default of the feature, no matter the stored value of the override itself. This is done to prevent stale values turning up in evaluation whenever a dependent flag should be served as off.

How did you test this code?

Added mapper tests, and an SDK API integration test.

@vercel

vercel Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

3 Skipped Deployments
Project Deployment Actions Updated
docs Ignored Ignored Preview Oct 15, 2026 7:45pm UTC
flagsmith-frontend-preview Ignored Ignored Preview Oct 15, 2026 7:45pm UTC
flagsmith-frontend-staging Ignored Ignored Preview Oct 15, 2026 7:45pm UTC

Request Review

@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 27d935f3-ef1e-4776-9765-79e0bc435ff2
📥 Commits

Reviewing files that changed from the base of the PR and between a297876 and dc034b6.

📒 Files selected for processing: 7
  • api/evaluation/mappers.py
  • api/features/dependencies/mappers.py
  • api/tests/integration/environments/identities/test_integration_identities.py
  • api/tests/unit/evaluation/test_unit_evaluation_mappers.py
  • api/tests/unit/features/dependencies/test_mappers.py
  • api/tests/unit/util/mappers/test_unit_mappers_engine.py
  • api/util/mappers/engine.py

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

📝 Walkthrough

Dependency-managed segment overrides now use the matching feature’s environment default as the source for the value, bucketing key and multivariate values in evaluation-context and engine mapping. The override continues to provide its enabled state and metadata. Tests cover source selection, multivariate mapping and identity evaluation.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Severity of issue fixed: Medium

Merge Risk: ⚪ Minimal · up to dc034

No actionable issue is established; the change is mergeable after normal checks.

- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added api Issue related to the REST API fix labels Oct 15, 2026
@codecov

codecov Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.87%. Comparing base (a297876) to head (dc034b6).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8793   +/-   ##
=======================================
  Coverage   98.87%   98.87%           
=======================================
  Files        1678     1678           
  Lines       69561    69626   +65     
=======================================
+ Hits        68775    68840   +65     
  Misses        786      786           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions github-actions Bot added fix and removed fix labels Oct 15, 2026
@github-actions github-actions Bot added fix and removed fix labels Oct 15, 2026
@github-actions github-actions Bot added fix and removed fix labels Oct 15, 2026
@github-actions github-actions Bot added fix and removed fix labels Oct 15, 2026
@khvn26
khvn26 marked this pull request as ready for review October 16, 2026 09:35
@khvn26
khvn26 requested a review from a team as a code owner October 16, 2026 09:35
@khvn26
khvn26 requested review from emyller and removed request for a team October 16, 2026 09:35
@github-actions github-actions Bot removed the fix label Oct 16, 2026
@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Docker builds report

Image Build Status Security report
ghcr.io/flagsmith/flagsmith-e2e:pr-8793 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-frontend:pr-8793 Finished ✅ Results ✅
ghcr.io/flagsmith/flagsmith-api-test:pr-8793 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-api:pr-8793 Finished ✅ Results ✅
ghcr.io/flagsmith/flagsmith:pr-8793 Finished ✅ Results ✅
ghcr.io/flagsmith/flagsmith-private-cloud:pr-8793 Finished ✅ Results ✅

@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor
✅ private-cloud · depot-ubuntu-latest-arm-16 — run #22524 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  3 passed

Details

stats  3 tests across 3 suites
duration  36.4 seconds
commit  dc034b6
info  🔄 Run: #22524 (attempt 1)

🗂️ Previous results
✅ private-cloud · depot-ubuntu-latest-16 — run #22524 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  3 passed

Details

stats  3 tests across 3 suites
duration  33.4 seconds
commit  dc034b6
info  🔄 Run: #22524 (attempt 1)

✅ oss · depot-ubuntu-latest-arm-16 — run #22524 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  2 passed

Details

stats  2 tests across 2 suites
duration  36.4 seconds
commit  dc034b6
info  🔄 Run: #22524 (attempt 1)

✅ oss · depot-ubuntu-latest-16 — run #22524 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  31.5 seconds
commit  dc034b6
info  🔄 Run: #22524 (attempt 1)

@github-actions

Copy link
Copy Markdown
Contributor

Visual Regression

20 screenshots compared. See report for details.
View full report

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api Issue related to the REST API fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dependency overrides serve a stale value while the prerequisite is off

2 participants