Skip to content

feat(Features API): Restrict code references querying to a feature flag#6970

Merged
emyller merged 7 commits intomainfrom
feat/hide-code-references-querying-under-flag
Mar 19, 2026
Merged

feat(Features API): Restrict code references querying to a feature flag#6970
emyller merged 7 commits intomainfrom
feat/hide-code-references-querying-under-flag

Conversation

@emyller
Copy link
Contributor

@emyller emyller commented Mar 17, 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

Contributes to #6945

  • Don't query code references unless code_references_ui_stats is enabled.

Important

How did you test this code?

  • Added / updated unit tests to is_feature_enabled.

@emyller emyller self-assigned this Mar 17, 2026
@claude
Copy link

claude bot commented Mar 17, 2026

⚠️ Code review skipped — your organization's overage spend limit has been reached.

Code review is billed via overage credits. To resume reviews, an organization admin can raise the monthly limit in Settings → Usage.

Once credits are available, reopen this pull request to trigger a review.

@vercel
Copy link

vercel bot commented Mar 17, 2026

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

3 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs Ignored Ignored Preview Mar 19, 2026 6:01pm
flagsmith-frontend-preview Ignored Ignored Preview Mar 19, 2026 6:01pm
flagsmith-frontend-staging Ignored Ignored Preview Mar 19, 2026 6:01pm

Request Review

@emyller emyller requested review from a team as code owners March 17, 2026 04:04
@emyller emyller requested review from khvn26 and talissoncosta and removed request for a team March 17, 2026 04:04
@emyller emyller changed the title Restrict code references querying to a feature flag feat(FeaturesAPI ): Restrict code references querying to a feature flag Mar 17, 2026
@emyller emyller changed the title feat(FeaturesAPI ): Restrict code references querying to a feature flag feat(Features API): Restrict code references querying to a feature flag Mar 17, 2026
@github-actions github-actions bot added front-end Issue related to the React Front End Dashboard api Issue related to the REST API labels Mar 17, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 17, 2026

Docker builds report

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

@github-actions
Copy link
Contributor

github-actions bot commented Mar 17, 2026

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  10 passed

Details

stats  10 tests across 7 suites
duration  28.3 seconds
commit  8cdf16b
info  🔄 Run: #15318 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  10 passed

Details

stats  10 tests across 7 suites
duration  27.8 seconds
commit  8cdf16b
info  🔄 Run: #15318 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  16 passed

Details

stats  16 tests across 13 suites
duration  1 minute, 1 second
commit  8cdf16b
info  🔄 Run: #15318 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  55.9 seconds
commit  8cdf16b
info  🔄 Run: #15318 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  10 passed

Details

stats  10 tests across 7 suites
duration  27.7 seconds
commit  3f51eff
info  🔄 Run: #15365 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  10 passed

Details

stats  10 tests across 7 suites
duration  46.9 seconds
commit  3f51eff
info  🔄 Run: #15365 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

failed  2 failed

Details

stats  2 tests across 2 suites
duration  25.2 seconds
commit  3f51eff
info  📦 Artifacts: View test results and HTML report
🔄 Run: #15365 (attempt 1)

Failed tests

firefox › tests/change-request-test.pw.ts › Change Request Tests › Change requests can be created, approved, and published with 4-eyes approval @enterprise
firefox › tests/roles-test.pw.ts › Roles Tests › Roles can be created with project and environment permissions @enterprise

### Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  10 passed

Details

stats  10 tests across 7 suites
duration  49.7 seconds
commit  3f51eff
info  🔄 Run: #15365 (attempt 2)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  16 passed

Details

stats  16 tests across 13 suites
duration  1 minute, 4 seconds
commit  3f51eff
info  🔄 Run: #15365 (attempt 2)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  2 passed

Details

stats  2 tests across 2 suites
duration  55.6 seconds
commit  3f51eff
info  🔄 Run: #15365 (attempt 2)

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  10 passed

Details

stats  10 tests across 7 suites
duration  46 seconds
commit  bbd889b
info  🔄 Run: #15377 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  10 passed

Details

stats  10 tests across 7 suites
duration  45.3 seconds
commit  bbd889b
info  🔄 Run: #15377 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  53.2 seconds
commit  bbd889b
info  🔄 Run: #15377 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  2 passed

Details

stats  2 tests across 2 suites
duration  1 minute, 1 second
commit  bbd889b
info  🔄 Run: #15377 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  10 passed

Details

stats  10 tests across 7 suites
duration  42.9 seconds
commit  52e42b2
info  🔄 Run: #15382 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  10 passed

Details

stats  10 tests across 7 suites
duration  11.5 seconds
commit  52e42b2
info  🔄 Run: #15382 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  59.1 seconds
commit  52e42b2
info  🔄 Run: #15382 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  44.5 seconds
commit  52e42b2
info  🔄 Run: #15382 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  16 passed

Details

stats  16 tests across 13 suites
duration  56.9 seconds
commit  5c513dd
info  🔄 Run: #15383 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  2 passed

Details

stats  2 tests across 2 suites
duration  54.7 seconds
commit  5c513dd
info  🔄 Run: #15383 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  10 passed

Details

stats  10 tests across 7 suites
duration  29.3 seconds
commit  5c513dd
info  🔄 Run: #15383 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  10 passed

Details

stats  10 tests across 7 suites
duration  27.3 seconds
commit  5c513dd
info  🔄 Run: #15383 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  10 passed

Details

stats  10 tests across 7 suites
duration  43 seconds
commit  8dde215
info  🔄 Run: #15386 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  10 passed

Details

stats  10 tests across 7 suites
duration  47.6 seconds
commit  8dde215
info  🔄 Run: #15386 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  10 passed

Details

stats  10 tests across 7 suites
duration  22.6 seconds
commit  0dcb5e9
info  🔄 Run: #15387 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  10 passed

Details

stats  10 tests across 7 suites
duration  29.6 seconds
commit  0dcb5e9
info  🔄 Run: #15387 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  16 passed

Details

stats  16 tests across 13 suites
duration  57.7 seconds
commit  8dde215
info  🔄 Run: #15386 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  2 passed

Details

stats  2 tests across 2 suites
duration  46.5 seconds
commit  8dde215
info  🔄 Run: #15386 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  2 passed

Details

stats  2 tests across 2 suites
duration  54.6 seconds
commit  0dcb5e9
info  🔄 Run: #15387 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  10 passed

Details

stats  10 tests across 7 suites
duration  43.9 seconds
commit  912a0cb
info  🔄 Run: #15388 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  10 passed

Details

stats  10 tests across 7 suites
duration  47.2 seconds
commit  912a0cb
info  🔄 Run: #15388 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  2 passed

Details

stats  2 tests across 2 suites
duration  1 minute, 3 seconds
commit  0dcb5e9
info  🔄 Run: #15387 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  16 passed

Details

stats  16 tests across 13 suites
duration  33.6 seconds
commit  912a0cb
info  🔄 Run: #15388 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  2 passed

Details

stats  2 tests across 2 suites
duration  45.6 seconds
commit  912a0cb
info  🔄 Run: #15388 (attempt 1)

@codecov
Copy link

codecov bot commented Mar 17, 2026

Codecov Report

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

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6970   +/-   ##
=======================================
  Coverage   98.32%   98.32%           
=======================================
  Files        1335     1335           
  Lines       49863    49876   +13     
=======================================
+ Hits        49026    49039   +13     
  Misses        837      837           

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

@kyle-ssg
Copy link
Member

Im a bit confused why this has any FE changes, but either way this now shows the following for a project that doesn't have code references integrated.

image

talissoncosta
talissoncosta previously approved these changes Mar 19, 2026
@github-actions github-actions bot added feature New feature or request and removed feature New feature or request labels Mar 19, 2026
talissoncosta
talissoncosta previously approved these changes Mar 19, 2026
@github-actions github-actions bot added feature New feature or request and removed feature New feature or request labels Mar 19, 2026
@github-actions github-actions bot added feature New feature or request and removed feature New feature or request labels Mar 19, 2026
khvn26
khvn26 previously approved these changes Mar 19, 2026
Copy link
Member

@khvn26 khvn26 left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@github-actions github-actions bot added feature New feature or request and removed feature New feature or request labels Mar 19, 2026
@emyller emyller force-pushed the feat/hide-code-references-querying-under-flag branch from 8dde215 to 0dcb5e9 Compare March 19, 2026 17:57
@emyller emyller requested a review from khvn26 March 19, 2026 17:58
@github-actions github-actions bot added feature New feature or request and removed feature New feature or request labels Mar 19, 2026
@emyller emyller force-pushed the feat/hide-code-references-querying-under-flag branch from 0dcb5e9 to 912a0cb Compare March 19, 2026 18:01
@github-actions github-actions bot added feature New feature or request and removed feature New feature or request labels Mar 19, 2026
@emyller emyller merged commit dcb0a37 into main Mar 19, 2026
33 checks passed
@emyller emyller deleted the feat/hide-code-references-querying-under-flag branch March 19, 2026 19:19
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 feature New feature or request front-end Issue related to the React Front End Dashboard

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants