Conversation
…re states in other environments beep boop
…and typed payload beep boop
There was a problem hiding this comment.
Code review is billed via overage credits. To resume reviews, an organization admin can raise the monthly limit at claude.ai/admin-settings/claude-code.
Once credits are available, reopen this pull request to trigger a review.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Docker builds report
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7349 +/- ##
========================================
Coverage 98.43% 98.44%
========================================
Files 1395 1398 +3
Lines 52514 52629 +115
========================================
+ Hits 51691 51809 +118
+ Misses 823 820 -3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
|
Visual Regression16 screenshots compared. See report for details. |
…v2-versioned environments beep boop
…nd export+import tests beep boop
…te live version in place beep boop
emyller
left a comment
There was a problem hiding this comment.
LGTM! Couple optional comments.
…rate via mapper + overwrite beep boop
…v-scoped semantics beep boop
emyller
left a comment
There was a problem hiding this comment.
Thanks for addressing my review neatly.
Thanks for submitting a PR! Please check the boxes below:
docs/if required so people know about the feature.Changes
Closes #7166
The
OVERWRITE_DESTRUCTIVEstrategy in_import_features_for_environmentdeleted the entireFeatureand recreated it. The cascade soft-deleted everyFeatureStateacross every environment, andFeature.objects.create(...)then re-seeded env-defaultFeatureStates for all environments using the exporter'sinitial_value/default_enabled. Only the target environment had the imported value/enabled written back, so every other environment was reset to the exporter's defaults.Replaced the delete + recreate with a new
overwrite_feature_for_environmentservice that:initial_value,is_server_key_only,default_enabled) in place. These only seed new environments and don't retroactively change existing FeatureStates.FeatureSegments and identity-overrideFeatureStates, preserving the destructive semantic within the target env. Other environments' overrides are untouched.MultivariateFeatureOptions on the feature by(type, value): reuses matches, creates missing, leaves extras alone (they may belong to other envs' allocations).MultivariateFeatureStateValuepercentage allocations and zeroes out any options the import dropped, scoped to the target env's MV state values only.FeatureStateviaFeatureState.objects.get_live_feature_states(...)so the live version's FS is targeted on v2-versioned environments. Previously a.filter(...).first()returned the lowest-id (initial-version) FS once subsequent versions had been published, silently no-opping the import.Also moved the existing create-strategy logic to
services.pyfor symmetry, and added aFeatureExportDataTypedDict intypes.pyto drop the previous untypeddict[str, Optional[Union[bool, str, int]]]signatures and a string of# type: ignorecomments.The v1 and v2 paths are identical: the destructive strategy mutates the live
FeatureStatein place rather than publishing a newEnvironmentFeatureVersion. Opting intoOVERWRITE_DESTRUCTIVEis opting out of audit trail; spending code to gently publish a new version subverts the strategy's stated intent.How did you test this code?
Two end-to-end tests covering the full export → import pipeline: