Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 3 Skipped Deployments
|
Feature.type field is unbounded
Contributor
Docker builds report
|
Contributor
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
|
Contributor
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
|
Contributor
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
|
Contributor
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
|
matthewelwell
approved these changes
Mar 9, 2026
emyller
approved these changes
Mar 9, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6888 +/- ##
=======================================
Coverage 98.33% 98.34%
=======================================
Files 1334 1335 +1
Lines 49661 49707 +46
=======================================
+ Hits 48836 48882 +46
Misses 825 825 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
docs/if required so people know about the feature.Changes
Closes #6886
In this PR, we constrain the
Feature.typefield to only accept valid choices (STANDARD,MULTIVARIATE), fixing a bug where arbitrary strings (e.g."boolean") could be written and then break Pydantic validation inEnvironmentCompressed.FeatureTypefromflagsmith_schemas.types(single source of truth) and deriveFEATURE_TYPE_CHOICESfrom it.choices=FEATURE_TYPE_CHOICESto theFeature.typemodel field.typeread-only inCreateFeatureSerializer— it is already derived automatically byMultivariateFeatureOptionlifecycle hooks.MULTIVARIATE, all others getSTANDARD.How did you test this code?
"boolean","flag"), applies migration, asserts they are corrected.typeis ignored when provided in a create request and defaults toSTANDARD.