feat(Dogfooding): Add OpenFeature SDK for server-side Flagsmith-on-Flagsmith#7008
feat(Dogfooding): Add OpenFeature SDK for server-side Flagsmith-on-Flagsmith#7008
Conversation
There was a problem hiding this comment.
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.
|
The latest updates on your projects. Learn more about Vercel for GitHub. 3 Skipped Deployments
|
Docker builds report
|
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7008 +/- ##
==========================================
- Coverage 98.33% 98.33% -0.01%
==========================================
Files 1335 1335
Lines 49943 49930 -13
==========================================
- Hits 49113 49100 -13
Misses 830 830 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Zaimwa9
left a comment
There was a problem hiding this comment.
Not much too say, I would approve if it wasn't for the dependency update and merge conflicts to come. Good addition overall
ddf8c99 to
0d6327b
Compare
Migrate Flagsmith-on-Flagsmith feature evaluation from the native Flagsmith Python SDK to the vendor-neutral OpenFeature SDK with the Flagsmith provider, dogfooding our own OpenFeature integration.
Custom kwargs bypassed get_provider_kwargs() entirely, meaning essential properties like the API key were never set when kwargs were provided.
0d6327b to
f8770f0
Compare
docs/if required so people know about the feature.Changes
Migrate Flagsmith-on-Flagsmith feature evaluation from the native Flagsmith Python SDK to the vendor-neutral OpenFeature SDK with the Flagsmith provider.
Added
openfeature-sdkandopenfeature-provider-flagsmith(>=0.1.6), now published on PyPI with flagsmith SDK v5 support.Replaced
get_client()withget_openfeature_client()inintegrations/flagsmith/client.py, using OpenFeature's provider registry with a named domain (flagsmith-api) and lazy initialisation viaProviderStatuscheck.Replaced
flagsmith_identifier+flagsmith_on_flagsmith_api_traitson the Organisation model with a singleopenfeature_evaluation_contextproperty returning anEvaluationContext.Migrated all call-sites from
client.get_identity_flags(...).is_feature_enabled("x")toclient.get_boolean_value("x", default_value=False, evaluation_context=...), including leftoverflags.is_feature_enabled()references inorganisations/tasks.pyandorganisations/task_helpers.py.enable_featurestest fixture now uses OpenFeature'sInMemoryProviderinstead of mocking Flagsmith internals. 22 org tasks tests migrated from manualget_openfeature_clientmocks to the fixture.Added
openfeature_flagsmith.*andlicensing.*to mypyignore_missing_importsoverrides (packages lackpy.typed).How did you test this code?
Made sure existing tests pass.