Skip to content

feat(__future__): Actionable error message for duplicate priorities in update-flag - #8303

Open
emyller wants to merge 1 commit into
mainfrom
feat/verbose-duplicated-priorities
Open

feat(__future__): Actionable error message for duplicate priorities in update-flag#8303
emyller wants to merge 1 commit into
mainfrom
feat/verbose-duplicated-priorities

Conversation

@emyller

@emyller emyller commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Thanks for submitting a PR! Please check the boxes below:

  • 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 #8301

Evolve conflicting segment override priority error message from, e.g.:

Duplicate priority: 1

To, e.g.:

The overrides for segments 33 (Test Segment) and 44 (Test Segment 2) are in conflict; provide explicit priority values.

How did you test this code?

Integration tests.

@emyller emyller self-assigned this Aug 14, 2026
@emyller
emyller requested a review from a team as a code owner August 14, 2026 22:21
@emyller
emyller requested review from khvn26 and removed request for a team August 14, 2026 22:21
@vercel

vercel Bot commented Aug 14, 2026

Copy link
Copy Markdown

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

3 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs Ignored Ignored Preview Aug 14, 2026 10:22pm
flagsmith-frontend-preview Ignored Ignored Preview Aug 14, 2026 10:22pm
flagsmith-frontend-staging Ignored Ignored Preview Aug 14, 2026 10:22pm

Request Review

@coderabbitai

coderabbitai Bot commented Aug 14, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Priority validation now groups ordered segment overrides by priority and detects conflicts. DuplicatePriorityError receives the conflicting segments and reports their IDs and names. The error also instructs callers to provide explicit priority values. Integration tests now verify the updated 400 responses for both conflict scenarios.

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

Merge Risk: ⚪ Minimal · up to c60cf

The change makes duplicate-priority errors identify the conflicting segments; validation may incur extra query materialization for unusually large feature configurations, but no actionable merge-blocking risk remains.


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 the api Issue related to the REST API label Aug 14, 2026
@emyller
emyller force-pushed the feat/verbose-duplicated-priorities branch from a9f3ce4 to c60cf82 Compare August 14, 2026 22:22
@github-actions github-actions Bot added the feature New feature or request label Aug 14, 2026
@github-actions

github-actions Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Docker builds report

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

@github-actions github-actions Bot added feature New feature or request and removed feature New feature or request labels Aug 14, 2026

@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: Pro Plus

Run ID: 91e51c55-da0f-4422-b3b2-c51bb9f408f2

📥 Commits

Reviewing files that changed from the base of the PR and between a013d7b and c60cf82.

📒 Files selected for processing (3)
  • api/features/future/exceptions.py
  • api/features/future/services.py
  • api/tests/integration/features/future/test_flag_endpoint.py

Comment thread api/features/future/services.py
@codecov

codecov Bot commented Aug 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.78%. Comparing base (a013d7b) to head (c60cf82).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8303   +/-   ##
=======================================
  Coverage   98.78%   98.78%           
=======================================
  Files        1604     1604           
  Lines       64335    64344    +9     
=======================================
+ Hits        63551    63560    +9     
  Misses        784      784           

☔ 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 commented Aug 14, 2026

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

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  54.8 seconds
commit  a9f3ce4
info  🔄 Run: #19410 (attempt 1)

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

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

passed  3 passed

Details

stats  3 tests across 3 suites
duration  59 seconds
commit  a9f3ce4
info  🔄 Run: #19410 (attempt 1)

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

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

passed  2 passed

Details

stats  2 tests across 2 suites
duration  32.2 seconds
commit  c60cf82
info  🔄 Run: #19411 (attempt 1)

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

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  40.1 seconds
commit  c60cf82
info  🔄 Run: #19411 (attempt 1)

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

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

passed  23 passed
skipped  1 skipped

Details

stats  24 tests across 18 suites
duration  1 minute, 25 seconds
commit  c60cf82
info  🔄 Run: #19411 (attempt 1)

Skipped tests

firefox › tests/onboarding-tests.pw.ts › Onboarding › New user connects via the single-page onboarding flow @oss

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

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  44.8 seconds
commit  a9f3ce4
info  🔄 Run: #19410 (attempt 1)

@github-actions

Copy link
Copy Markdown
Contributor
✅ oss · depot-ubuntu-latest-16 — run #19411 (attempt 1)

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  41.1 seconds
commit  c60cf82
info  🔄 Run: #19411 (attempt 1)

@github-actions

Copy link
Copy Markdown
Contributor
✅ oss · depot-ubuntu-latest-16 — run #19410 (attempt 1)

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  36.8 seconds
commit  a9f3ce4
info  🔄 Run: #19410 (attempt 1)

@github-actions

github-actions Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Visual Regression

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

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.

Actionable error message for duplicate priorities in update-flag

1 participant