Skip to content

fix(Dogfooding): OpenFeature-gated flags always resolving to default#7310

Merged
khvn26 merged 1 commit intomainfrom
fix/openfeature-provider-initialisation
Apr 22, 2026
Merged

fix(Dogfooding): OpenFeature-gated flags always resolving to default#7310
khvn26 merged 1 commit intomainfrom
fix/openfeature-provider-initialisation

Conversation

@khvn26
Copy link
Copy Markdown
Member

@khvn26 khvn26 commented Apr 22, 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 #7008.

The flagsmith-api domain falls back to a ready NoOpProvider until set_provider is called, so the status != READY guard in get_openfeature_client never runs initialise_provider. Every OpenFeature-gated flag silently resolves to its default — compress_dynamo_documents hasn't compressed a document since #7008 shipped.

Check get_provider_metadata(domain).is_default_provider instead.

How did you test this code?

New unit tests in tests/unit/integrations/flagsmith/test_unit_flagsmith_client.py exercise the real openfeature_api registry, which the existing coverage fully mocked (why this slipped through).

The `flagsmith-api` domain falls back to a ready `NoOpProvider` until
`set_provider` is called, so `get_provider_status() != READY` never
triggered `initialise_provider`. Every OpenFeature-gated flag silently
resolved to its default — including `compress_dynamo_documents`, which
hasn't compressed any environment documents since PR #7008 shipped.

beep boop
@khvn26 khvn26 requested a review from a team as a code owner April 22, 2026 10:43
@khvn26 khvn26 requested review from gagantrivedi and removed request for a team April 22, 2026 10:43
Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

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

⚠️ 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 at claude.ai/admin-settings/claude-code.

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

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 22, 2026

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

3 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs Ignored Ignored Apr 22, 2026 10:43am
flagsmith-frontend-preview Ignored Ignored Apr 22, 2026 10:43am
flagsmith-frontend-staging Ignored Ignored Apr 22, 2026 10:43am

Request Review

@github-actions github-actions Bot added api Issue related to the REST API fix labels Apr 22, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 22, 2026

Docker builds report

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 22, 2026

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

passed  11 passed

Details

stats  11 tests across 8 suites
duration  43.5 seconds
commit  f3fe6e8
info  🔄 Run: #16248 (attempt 1)

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

passed  11 passed

Details

stats  11 tests across 8 suites
duration  10.6 seconds
commit  f3fe6e8
info  🔄 Run: #16248 (attempt 1)

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

passed  17 passed

Details

stats  17 tests across 14 suites
duration  59.4 seconds
commit  f3fe6e8
info  🔄 Run: #16248 (attempt 1)

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

passed  2 passed

Details

stats  2 tests across 2 suites
duration  45.9 seconds
commit  f3fe6e8
info  🔄 Run: #16248 (attempt 1)

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 22, 2026

Codecov Report

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

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7310   +/-   ##
=======================================
  Coverage   98.40%   98.40%           
=======================================
  Files        1377     1377           
  Lines       51610    51636   +26     
=======================================
+ Hits        50786    50812   +26     
  Misses        824      824           

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

@github-actions
Copy link
Copy Markdown
Contributor

Visual Regression

16 screenshots compared. See report for details.
View full report

@khvn26 khvn26 merged commit d6cba10 into main Apr 22, 2026
36 checks passed
@khvn26 khvn26 deleted the fix/openfeature-provider-initialisation branch April 22, 2026 10:59
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