-
Notifications
You must be signed in to change notification settings - Fork 458
feat: added-query-param-to-get-segment-feature-states #6156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: added-query-param-to-get-segment-feature-states #6156
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 3 Skipped Deployments
|
Docker builds report
|
for more information, see https://pre-commit.ci
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6156 +/- ##
=======================================
Coverage 98.00% 98.01%
=======================================
Files 1278 1278
Lines 45122 45178 +56
=======================================
+ Hits 44223 44280 +57
+ Misses 899 898 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Couple of changes @gagantrivedi 🙏 : |
|
This simplifies the FE so much! Tested with the code in #6137 |
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Thanks for submitting a PR! Please check the boxes below:
docs/if required so people know about the feature!Changes
GET/api/v1/projects/{project_id}/features/?environment={env_id}&segment={segment_id}endpoint now accept query-string params?segment=xx` to return the requested segment' feature statesAdded
segment_feature_stateto response whensegment=xxis passed in. Without or with invalid segment, the response is untouchedFrom V1 to V2:
Frontend was initially going to get the features list and reconciliate the feature states with it. However we realized that this could lead to some loopholes due to features list pagination.
V2 includes a new query param in order to attach the
segment_feature_stateto the features list to avoid pagination discrepancies.How did you test this code?
Example payload: