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: resolve environment N+1 caused by feature versioning v2 #3040

Merged
merged 1 commit into from
Nov 27, 2023

Conversation

matthewelwell
Copy link
Contributor

@matthewelwell matthewelwell commented Nov 27, 2023

Changes

Caused by the addition of this line in the feature versioning V2, this PR resolves an N+1 query issue retrieving the environment.

Note, this adds a test to the old location to keep things grouped for now but should be moved to the new location asap.

How did you test this code?

Added a test to reproduce the N+1 error before resolving.

Copy link

vercel bot commented Nov 27, 2023

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 Nov 27, 2023 4:24pm
flagsmith-frontend-preview ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 27, 2023 4:24pm
flagsmith-frontend-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 27, 2023 4:24pm

Copy link
Contributor

github-actions bot commented Nov 27, 2023

Uffizzi Preview deployment-41515 was deleted.

@codecov-commenter
Copy link

codecov-commenter commented Nov 27, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (e5058ae) 95.73% compared to head (0d7a33d) 95.73%.
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3040   +/-   ##
=======================================
  Coverage   95.73%   95.73%           
=======================================
  Files        1046     1044    -2     
  Lines       30859    30866    +7     
=======================================
+ Hits        29544    29551    +7     
  Misses       1315     1315           

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

Copy link
Contributor

@zachaysan zachaysan left a comment

Choose a reason for hiding this comment

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

Awesome fix!

@matthewelwell matthewelwell changed the title fix: WIP environment N+1 fix: resolve environment N+1 caused by feature versioning v2 Nov 27, 2023
@matthewelwell matthewelwell added this pull request to the merge queue Nov 27, 2023
Merged via the queue into main with commit 5392480 Nov 27, 2023
@matthewelwell matthewelwell deleted the fix/environments-n+1 branch November 27, 2023 16:32
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants