fix: Change registration to use the Isolated API instead of global singleton#760
Merged
Conversation
…ce collection Signed-off-by: André Silva <2493377+askpt@users.noreply.github.com>
…ce to clarify lifecycle management Signed-off-by: André Silva <2493377+askpt@users.noreply.github.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #760 +/- ##
=======================================
Coverage 93.52% 93.52%
=======================================
Files 69 69
Lines 2981 2981
Branches 355 355
=======================================
Hits 2788 2788
Misses 135 135
Partials 58 58 ☔ 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 updates the OpenFeature service registration to use an isolated API instance instead of the global singleton. Feedback suggests using a factory delegate for the singleton registration to avoid unnecessary object allocation and recommends shortening the verbose warning suppression comment for better readability.
…ambda expression Signed-off-by: André Silva <2493377+askpt@users.noreply.github.com>
askpt
marked this pull request as ready for review
May 21, 2026 20:25
kylejuliandev
approved these changes
May 21, 2026
askpt
requested review from
arttonoyan,
beeme1mr,
benjiro,
chrfwow,
kinyoklion and
toddbaert
May 22, 2026 07:20
arttonoyan
approved these changes
May 22, 2026
|
Thanks for fixing this! |
|
any estimate on when this fix will be published? |
Member
Author
This was referenced Jun 22, 2026
Closed
Closed
This was referenced Jul 16, 2026
Closed
Closed
Closed
Closed
Open
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR
This pull request updates how the OpenFeature API instance is registered within the dependency injection container. Instead of registering the global
Api.Instance, it now registers an isolated API instance usingOpenFeatureFactory.CreateIsolated(). This ensures that all components in the application share the same isolated instance, allowing for better lifecycle management and isolation from global state.Dependency injection and API registration:
Api.Instancesingleton with an isolated API instance created byOpenFeatureFactory.CreateIsolated()inAddOpenFeatureto ensure application-wide isolation and improved lifecycle management.using OpenFeature.Isolated;to support the creation of isolated API instances.Related Issues
Fixes #759