feat(api): add isolated API instances#591
feat(api): add isolated API instances#591marcozabel wants to merge 11 commits intoopen-feature:mainfrom
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #591 +/- ##
==========================================
- Coverage 98.33% 98.25% -0.09%
==========================================
Files 45 48 +3
Lines 2157 2458 +301
==========================================
+ Hits 2121 2415 +294
- Misses 36 43 +7
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Code Review
This pull request introduces isolated OpenFeature API instances, enabling multiple independent configurations within a single application as per specification requirement 1.8. The core logic refactors global state into an OpenFeatureAPI class, with the existing global singleton now delegating to a default instance to maintain backward compatibility. Key changes include the introduction of an EventSupport class, updates to the OpenFeatureClient to reference specific API instances, and the addition of a new openfeature.isolated module. Review feedback recommends improving encapsulation by adding public methods to OpenFeatureAPI for retrieving providers and their status, rather than having the client access protected registry attributes directly.
a277973 to
904a42a
Compare
Signed-off-by: marcozabel <marco.zabel@dynatrace.com>
…nd context getter Signed-off-by: marcozabel <marco.zabel@dynatrace.com>
Signed-off-by: marcozabel <marco.zabel@dynatrace.com>
Signed-off-by: marcozabel <marco.zabel@dynatrace.com>
Signed-off-by: marcozabel <marco.zabel@dynatrace.com>
Signed-off-by: marcozabel <marco.zabel@dynatrace.com>
…r-instance storage Signed-off-by: marcozabel <marco.zabel@dynatrace.com>
Signed-off-by: marcozabel <marco.zabel@dynatrace.com>
904a42a to
97798e3
Compare
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Signed-off-by: Marco Zabel <marco.zabel@dynatrace.com>
Signed-off-by: marcozabel <marco.zabel@dynatrace.com>
Signed-off-by: marcozabel <marco.zabel@dynatrace.com>
This PR introduces support for creating isolated OpenFeature API instances, each with their own providers, hooks, context, and event handling - enabling multi-tenant or side-by-side usage without shared global state.
Fixes #584