Skip to content

feat(Flag Dependency): List dependencies - #8571

Open
emyller wants to merge 3 commits into
feat/add-prerequisitefrom
feat/list-dependencies
Open

emyller wants to merge 3 commits into
feat/add-prerequisitefrom
feat/list-dependencies

Conversation

@emyller

@emyller emyller commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor
  • 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 #8414

Adds two new endpoints:

  • /api/v1/environments/{key}/features/{feature}/dependencies/ will list any prerequisites of feature.
  • /api/v1/environments/{key}/features/{feature}/dependents/ will list any other features that depend on feature.

Both respond with a list of DependencyEdge items, consistent with the response given when adding a prerequisite (#8413), and in error messages containing a dependency path.

As a consequence of a [CodeRabbit] review, the get_live_or_scheduled_overrides utility recently improved in #8548 receives another upgrade, moving the or_scheduled piece from the function name to a new kwarg. This adds an extra point of review effort.

How did you test this code?

New integration tests.

@emyller emyller self-assigned this Sep 22, 2026
@emyller
emyller requested review from a team as code owners September 22, 2026 22:30
@emyller
emyller requested review from matthewelwell and removed request for a team September 22, 2026 22:30
@vercel

vercel Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
docs Ready Ready Preview Sep 24, 2026 6:37pm UTC
2 Skipped Deployments
Project Deployment Actions Updated
flagsmith-frontend-preview Ignored Ignored Preview Sep 24, 2026 6:37pm UTC
flagsmith-frontend-staging Ignored Ignored Preview Sep 24, 2026 6:37pm UTC

Request Review

@github-actions github-actions Bot added api Issue related to the REST API docs Documentation updates labels Sep 22, 2026
@coderabbitai

coderabbitai Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

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

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 6249c67a-89c4-48dd-b6a2-f44a821ea34c

📥 Commits

Reviewing files that changed from the base of the PR and between b318ebc and adc4bfc.

📒 Files selected for processing (4)
  • api/segments/services.py
  • docs/docs/deployment-self-hosting/observability/_events-catalogue.md
  • mcp/src/flagsmith_mcp/openapi.json
  • openapi.yaml

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


📝 Walkthrough

Walkthrough

The change adds authenticated endpoints to list a feature’s dependencies and dependents within an environment. It adds response types and API schemas for dependency edges and referencing segments. The live override query now excludes scheduled overrides by default and can include them when requested. Existing segment consumers and dependency services use the updated query. Tests cover listing results, override state, environment scope, missing resources, and permissions.

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

Merge Risk: ⚪ Minimal · up to adc4b

The dependency-listing endpoints appear ready to merge after normal checks; no outstanding issue has been established.


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 removed the docs Documentation updates label Sep 22, 2026
@github-actions

github-actions Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Docker builds report

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

@github-actions github-actions Bot added feature New feature or request docs Documentation updates labels Sep 22, 2026
@emyller
emyller changed the base branch from main to feat/add-prerequisite September 22, 2026 22:33
@github-actions

github-actions Bot commented Sep 22, 2026 •

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

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  1 minute, 2 seconds
commit  adc4bfc
info  🔄 Run: #20818 (attempt 1)

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

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

passed  4 passed

Details

stats  4 tests across 4 suites
duration  3.1 seconds
commit  adc4bfc
info  🔄 Run: #20818 (attempt 1)

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

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  41.6 seconds
commit  adc4bfc
info  🔄 Run: #20818 (attempt 1)

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

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  41.5 seconds
commit  adc4bfc
info  🔄 Run: #20818 (attempt 1)

✅ private-cloud · depot-ubuntu-latest-arm-16 — run #20705 (attempt 1)

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

passed  2 passed

Details

stats  2 tests across 2 suites
duration  42.2 seconds
commit  b318ebc
info  🔄 Run: #20705 (attempt 1)

✅ private-cloud · depot-ubuntu-latest-16 — run #20705 (attempt 1)

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  11.5 seconds
commit  b318ebc
info  🔄 Run: #20705 (attempt 1)

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

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  22.3 seconds
commit  b318ebc
info  🔄 Run: #20705 (attempt 1)

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

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  33.5 seconds
commit  b318ebc
info  🔄 Run: #20705 (attempt 1)

✅ private-cloud · depot-ubuntu-latest-arm-16 — run #20621 (attempt 1)

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  1 minute, 6 seconds
commit  9d966b6
info  🔄 Run: #20621 (attempt 1)

✅ private-cloud · depot-ubuntu-latest-16 — run #20621 (attempt 1)

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  59.1 seconds
commit  9d966b6
info  🔄 Run: #20621 (attempt 1)

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

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

passed  2 passed

Details

stats  2 tests across 2 suites
duration  39.4 seconds
commit  9d966b6
info  🔄 Run: #20621 (attempt 1)

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

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  32.9 seconds
commit  9d966b6
info  🔄 Run: #20621 (attempt 1)

@emyller
emyller added this pull request to stack #8572 September 22, 2026 22:35
@codecov

codecov Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.82%. Comparing base (853e1d7) to head (adc4bfc).

Additional details and impacted files
@@                   Coverage Diff                   @@
##           feat/add-prerequisite    #8571    +/-   ##
=======================================================
  Coverage                  98.81%   98.82%            
=======================================================
  Files                       1642     1642            
  Lines                      67497    67690   +193     
=======================================================
+ Hits                       66700    66893   +193     
  Misses                       797      797            

☔ 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.

@emyller
emyller force-pushed the feat/list-dependencies branch from 600a6cd to 195dffa Compare September 22, 2026 22:36
@github-actions github-actions Bot added feature New feature or request and removed feature New feature or request docs Documentation updates labels Sep 22, 2026
@github-actions

github-actions Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Visual Regression

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: e991a6ab-262a-4e51-b2a7-98bc73197cc7

📥 Commits

Reviewing files that changed from the base of the PR and between ae206ed and 195dffa.

📒 Files selected for processing (12)
  • api/environments/urls.py
  • api/features/dependencies/exceptions.py
  • api/features/dependencies/services.py
  • api/features/dependencies/types.py
  • api/features/dependencies/views.py
  • api/tests/integration/features/conftest.py
  • api/tests/integration/features/dependencies/test_dependency_management.py
  • api/tests/types.py
  • docs/docs/deployment-self-hosting/observability/_events-catalogue.md
  • mcp/src/flagsmith_mcp/openapi.json
  • openapi.yaml
  • sdk/openapi.yaml

Included review availability: Your plan provides up to 8 included reviews per hour; 6 remain after this review.

Comment thread api/features/dependencies/services.py Outdated
@github-actions github-actions Bot added docs Documentation updates feature New feature or request and removed feature New feature or request docs Documentation updates labels Sep 23, 2026
@emyller
emyller force-pushed the feat/list-dependencies branch from 9d966b6 to b318ebc Compare September 23, 2026 14:57
@github-actions github-actions Bot added docs Documentation updates feature New feature or request and removed feature New feature or request docs Documentation updates labels Sep 23, 2026
@emyller
emyller force-pushed the feat/list-dependencies branch from b318ebc to adc4bfc Compare September 24, 2026 18:36
@github-actions github-actions Bot added docs Documentation updates feature New feature or request and removed feature New feature or request docs Documentation updates labels Sep 24, 2026

This branch was successfully deployed

1 active deployment
Preview – docs — adc4bfcd Deployed Sep 24, 2026 by vercel[bot]
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 feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dependencies API: list dependencies and dependents

2 participants