Skip to content

fix(Code References): Code references are slow to query#7463

Draft
emyller wants to merge 3 commits intomainfrom
fix/fast-code-references
Draft

fix(Code References): Code references are slow to query#7463
emyller wants to merge 3 commits intomainfrom
fix/fast-code-references

Conversation

@emyller
Copy link
Copy Markdown
Contributor

@emyller emyller commented May 8, 2026

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

  • I have read the Contributing Guide.
  • 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.

Changes

Closes #5932

Improve code references so they're usable again.

The previous data model did not handle accumulated code references too well, and we had to disable it.

This patch will:

  • Complete redesign the data model of code references.
  • Migrate old data to new data.
  • Improve code references querying performance from [old request time p90] to [new request time p90] in staging.
  • Prevent duplicate scans — for hygiene: performance gain does not rely on this.
  • Add a new "vcs_provider" to the API — but defaults to "github" for compatibility.

How did you test this code?

  • Unit tests.
  • Performance tests in staging.

@emyller emyller self-assigned this May 8, 2026
@vercel
Copy link
Copy Markdown

vercel Bot commented May 8, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment May 8, 2026 10:57pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
flagsmith-frontend-preview Ignored Ignored May 8, 2026 10:57pm
flagsmith-frontend-staging Ignored Ignored May 8, 2026 10:57pm

Request Review

@github-actions github-actions Bot added api Issue related to the REST API docs Documentation updates labels May 8, 2026
@emyller emyller changed the title Fix/fast code references fix(Code References): Code references are slow to query May 8, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.44%. Comparing base (e4651d1) to head (b809ab4).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7463   +/-   ##
=======================================
  Coverage   98.44%   98.44%           
=======================================
  Files        1398     1399    +1     
  Lines       52654    52705   +51     
=======================================
+ Hits        51834    51885   +51     
  Misses        820      820           

☔ 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.

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 docs Documentation updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Code references are slow to query

1 participant