Skip to content

feat(api): Restrict identity overrides to a single multivariate variant - #8605

Open
khvn26 wants to merge 1 commit into
stack/4-environment-flagsfrom
feat/8597-single-variant-identity-overrides
Open

khvn26 wants to merge 1 commit into
stack/4-environment-flagsfrom
feat/8597-single-variant-identity-overrides

Conversation

@khvn26

@khvn26 khvn26 commented Sep 25, 2026

Copy link
Copy Markdown
Member

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

Contributes to #8597

In this PR, we reject identity override writes, in Core and Edge, unless they pin a single variant at 100% or none for the control value.

This is a breaking change for API clients writing multivariate splits to identity overrides. The dashboard never does.

Existing identity overrides storing a split are left as they are, pending scoping of their migration.

How did you test this code?

Added tests for creating and updating a Core identity override, and creating an Edge one, with no variants, a pinned variant, a split, and a partial variant.

An identity is only ever served one variant, and the dashboard only ever
writes one at 100%, or none for the control value. The API now accepts
nothing else.
@vercel

vercel Bot commented Sep 25, 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 Sep 25, 2026 7:51pm UTC
flagsmith-frontend-preview Ignored Ignored Preview Sep 25, 2026 7:51pm UTC
flagsmith-frontend-staging Ignored Ignored Preview Sep 25, 2026 7:51pm UTC

Request Review

@coderabbitai

coderabbitai Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: a2292e0b-0e43-4f2f-918c-fa3b76c27144

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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 feature New feature or request labels Sep 25, 2026
@codecov

codecov Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.81%. Comparing base (9900822) to head (252e236).

Additional details and impacted files
@@                      Coverage Diff                      @@
##           stack/4-environment-flags    #8605      +/-   ##
=============================================================
- Coverage                      98.82%   98.81%   -0.01%     
=============================================================
  Files                           1645     1645              
  Lines                          67561    67591      +30     
=============================================================
+ Hits                           66764    66789      +25     
- Misses                           797      802       +5     

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

@khvn26
khvn26 marked this pull request as ready for review September 28, 2026 10:41
@khvn26
khvn26 requested a review from a team as a code owner September 28, 2026 10:41
@khvn26
khvn26 requested review from matthewelwell and removed request for a team September 28, 2026 10:41
@github-actions github-actions Bot removed the feature New feature or request label Sep 28, 2026
@github-actions

github-actions Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Docker builds report

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

@github-actions github-actions Bot added the feature New feature or request label Sep 28, 2026
@github-actions

github-actions Bot commented Sep 28, 2026 •

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

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

passed  2 passed

Details

stats  2 tests across 2 suites
duration  49.2 seconds
commit  252e236
info  🔄 Run: #20882 (attempt 1)

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

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

passed  4 passed

Details

stats  4 tests across 4 suites
duration  11.7 seconds
commit  252e236
info  🔄 Run: #20882 (attempt 1)

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

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  35.1 seconds
commit  252e236
info  🔄 Run: #20882 (attempt 1)

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

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  31.2 seconds
commit  252e236
info  🔄 Run: #20882 (attempt 1)

@github-actions

Copy link
Copy Markdown
Contributor

Visual Regression

19 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 feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant