-
Notifications
You must be signed in to change notification settings - Fork 412
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): fix exception getting feature states for edge identity post v2 versioning migration #3916
fix(versioning): fix exception getting feature states for edge identity post v2 versioning migration #3916
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
🔍 Existing Issues For ReviewYour pull request is modifying functions with the following pre-existing issues: 📄 File: api/edge_api/identities/models.py
Did you find this useful? React with a 👍 or 👎 |
Uffizzi Preview |
FeatureStateValue.objects.filter(feature_state=segment_override_p1).update( | ||
string_value="p1" | ||
) | ||
FeatureStateValue.objects.filter(feature_state=segment_override_p2).update( | ||
string_value="p2" | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These seemed superfluous since we're using the feature state's ID for the assertion below.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3916 +/- ##
==========================================
+ Coverage 95.94% 95.98% +0.04%
==========================================
Files 1135 1135
Lines 36087 36182 +95
==========================================
+ Hits 34624 34731 +107
+ Misses 1463 1451 -12 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks good, but I wonder if existing code has any django_assert_num_queries
against it. If not, would be good to get some coverage.
There are certainly some sprinkled throughout the test suite on the important code paths that will use these functions, however, I have added some additional uses of the fixture in on some specific unit tests to also verify things. |
Thanks for submitting a PR! Please check the boxes below:
pre-commit
to check lintingdocs/
if required so people know about the feature!Changes
Fixes an issue where retrieving the flags for an Edge Identity following a v2 versioning migration in an environment which had previously used the change requests functionality caused an exception.
How did you test this code?
Reproduced the issue with a unit test that I was then able to get to pass following the changes. Existing unit tests should cover the refactoring that was included as part of this PR.