Skip to content
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

fix(versioning): handle versioned environments for associated-features endpoint #4735

Merged
merged 5 commits into from
Oct 28, 2024

Conversation

matthewelwell
Copy link
Contributor

@matthewelwell matthewelwell commented Oct 16, 2024

Changes

Adds a new query parameter to the segments/:id/associated-features/ endpoint which allows us to filter segment overrides by the current environment, and hence we can filter by latest versions.

How did you test this code?

Added unit test for the API.

Tested FE changes locally.

@matthewelwell matthewelwell requested review from a team as code owners October 16, 2024 10:26
@matthewelwell matthewelwell requested review from kyle-ssg and zachaysan and removed request for a team October 16, 2024 10:26
Copy link

vercel bot commented Oct 16, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 23, 2024 10:22am
flagsmith-frontend-preview ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 23, 2024 10:22am
flagsmith-frontend-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 23, 2024 10:22am

@github-actions github-actions bot added front-end Issue related to the React Front End Dashboard api Issue related to the REST API fix labels Oct 16, 2024
Copy link
Contributor

github-actions bot commented Oct 16, 2024

Docker builds report

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

Copy link
Contributor

github-actions bot commented Oct 16, 2024

Uffizzi Preview deployment-57306 was deleted.

Copy link

codecov bot commented Oct 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.22%. Comparing base (6d2ab58) to head (032fbec).
Report is 19 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4735   +/-   ##
=======================================
  Coverage   97.21%   97.22%           
=======================================
  Files        1172     1172           
  Lines       40535    40569   +34     
=======================================
+ Hits        39408    39443   +35     
+ Misses       1127     1126    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@matthewelwell matthewelwell requested review from a team and khvn26 and removed request for zachaysan and a team October 16, 2024 12:30
@github-actions github-actions bot added fix and removed fix labels Oct 16, 2024
@matthewelwell matthewelwell force-pushed the fix/associated-features-endpoint branch from 4366e68 to 8a077c1 Compare October 16, 2024 12:32
@github-actions github-actions bot added fix and removed fix labels Oct 16, 2024
# Conflicts:
#	frontend/web/components/modals/AssociatedSegmentOverrides.js
@@ -593,6 +593,10 @@ class Meta:
fields = ("id", "feature", "environment")


class AssociatedFeaturesQuerySerializer(serializers.Serializer):
environment = serializers.IntegerField(required=False)
Copy link
Member

@khvn26 khvn26 Oct 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a note to self — we do seem to have a convention to use entity, not entity_id, for query filters. The rule is only broken for the evaluation-data endpoint, which has an environment_id filter.

@matthewelwell matthewelwell added this pull request to the merge queue Oct 28, 2024
Merged via the queue into main with commit 7d40a07 Oct 28, 2024
35 checks passed
@matthewelwell matthewelwell deleted the fix/associated-features-endpoint branch October 28, 2024 12:45
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 fix front-end Issue related to the React Front End Dashboard
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants