feat: add delete-segment-override experimental endpoint#6383
Merged
gagantrivedi merged 2 commits intomainfrom Dec 10, 2025
Merged
feat: add delete-segment-override experimental endpoint#6383gagantrivedi merged 2 commits intomainfrom
gagantrivedi merged 2 commits intomainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 3 Skipped Deployments
|
e00b4f7 to
f2337bc
Compare
Contributor
Docker builds report
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6383 +/- ##
========================================
Coverage 98.05% 98.06%
========================================
Files 1289 1289
Lines 46162 46293 +131
========================================
+ Hits 45264 45395 +131
Misses 898 898 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
khvn26
reviewed
Dec 8, 2025
Member
khvn26
left a comment
There was a problem hiding this comment.
Just a handful of comments; otherwise, looks good.
Base automatically changed from
feat/experimental-flag-update-endpoints
to
main
December 10, 2025 02:39
Implements issue #6234 - adds endpoint to delete segment overrides for a feature in a given environment. Endpoint: POST /api/experiments/environments/{environment_key}/delete-segment-override/ Request body: - feature: {name: "x"} OR {id: 123} - segment: {id: 456} Response: 204 No Content Features: - Works with both V1 and V2 feature versioning - V1: Direct deletion of FeatureSegment - V2: Creates new version, removes segment override, publishes - Reuses UPDATE_FEATURE_STATE permission - Blocked when workflow/change requests are enabled - Returns 400 if segment override doesn't exist Files changed: - versioning_service.py: Add delete_segment_override() with V1/V2 dispatch - serializers.py: Add DeleteSegmentOverrideSerializer - views.py: Add delete_segment_override view - experiments.py: Add URL route - tests: Add 9 test cases covering all scenarios 🤖 Generated with [Claude Code](https://claude.com/claude-code)
f2337bc to
6dde16c
Compare
- Update swagger tag from "Experimental - Feature States" to "experimental" to match other experimental endpoints - Refactor delete_segment_override to use AuthorData dataclass instead of separate user/api_key parameters for consistency with other functions
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.
Thanks for submitting a PR! Please check the boxes below:
docs/if required so people know about the feature!Changes
Implements issue #6234 - adds endpoint to delete segment overrides for a feature in a given environment.
Endpoint: POST /api/experiments/environments/{environment_key}/delete-segment-override/
Request body:
Response: 204 No Content
Features:
How did you test this code?
Adds unit tests