Skip to content

fix(n+1): fix environment-document n+1 for env_feature_version#5332

Merged
gagantrivedi merged 2 commits intomainfrom
fix/environment-documen-n+1
Apr 11, 2025
Merged

fix(n+1): fix environment-document n+1 for env_feature_version#5332
gagantrivedi merged 2 commits intomainfrom
fix/environment-documen-n+1

Conversation

@gagantrivedi
Copy link
Member

@gagantrivedi gagantrivedi commented Apr 11, 2025

Thanks for submitting a PR! Please check the boxes below:

  • I have added information to docs/ if required so people know about the feature!
  • I have filled in the "Changes" section below?
  • I have filled in the "How did you test this code" section below?
  • I have used a Conventional Commit title for this Pull Request

Changes

Prefetch environment_feature_version to avoid n+1

How did you test this code?

Unit test updated to cover this change

@gagantrivedi gagantrivedi requested a review from a team as a code owner April 11, 2025 07:38
@gagantrivedi gagantrivedi requested review from matthewelwell and removed request for a team April 11, 2025 07:38
@vercel
Copy link

vercel bot commented Apr 11, 2025

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

3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
docs ⬜️ Ignored (Inspect) Visit Preview Apr 11, 2025 7:45am
flagsmith-frontend-preview ⬜️ Ignored (Inspect) Visit Preview Apr 11, 2025 7:45am
flagsmith-frontend-staging ⬜️ Ignored (Inspect) Visit Preview Apr 11, 2025 7:45am

@github-actions github-actions bot added api Issue related to the REST API fix labels Apr 11, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Apr 11, 2025

Docker builds report

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

"feature",
"feature_state_value",
"identity",
"environment_feature_version",
Copy link
Member Author

Choose a reason for hiding this comment

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

"We can include or exclude this based on whether environment.use_v2_feature_versioning is enabled, but I don't really see any downside to including it for environments where use_v2_feature_versioning is not enabled."

Copy link
Contributor

Choose a reason for hiding this comment

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

agreed.

@github-actions
Copy link
Contributor

github-actions bot commented Apr 11, 2025

Uffizzi Preview deployment-62692 was deleted.

@github-actions github-actions bot added fix and removed fix labels Apr 11, 2025
"feature",
"feature_state_value",
"identity",
"environment_feature_version",
Copy link
Contributor

Choose a reason for hiding this comment

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

agreed.

@codecov
Copy link

codecov bot commented Apr 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.53%. Comparing base (3a98aca) to head (1eca479).
Report is 5 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5332   +/-   ##
=======================================
  Coverage   97.53%   97.53%           
=======================================
  Files        1225     1225           
  Lines       42551    42556    +5     
=======================================
+ Hits        41503    41508    +5     
  Misses       1048     1048           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@gagantrivedi gagantrivedi merged commit 8b4be6c into main Apr 11, 2025
37 checks passed
@gagantrivedi gagantrivedi deleted the fix/environment-documen-n+1 branch April 11, 2025 08:12
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants