-
Notifications
You must be signed in to change notification settings - Fork 22
fix: Ensure AddPolicyName without adding a Provider does not get stuck in infinite loop #606
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
* If you add a AddPolicyName without having previously added a Provider, the code will get stuck trying to resolve IFeatureClient Signed-off-by: Kyle Julian <[email protected]>
Summary of ChangesHello @kylejuliandev, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request resolves a critical issue in the OpenFeature .NET SDK where applications could get stuck in an infinite loop if Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request correctly addresses a critical issue that could lead to an infinite loop when resolving IFeatureClient without a registered provider. The introduction of the ResolveFeatureClient method effectively breaks the circular dependency. I've included a couple of suggestions to further simplify the new code by reducing redundancy, which will improve its maintainability. Overall, this is a solid fix.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #606 +/- ##
==========================================
+ Coverage 89.76% 89.88% +0.11%
==========================================
Files 77 77
Lines 3166 3172 +6
Branches 364 364
==========================================
+ Hits 2842 2851 +9
+ Misses 253 251 -2
+ Partials 71 70 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: Kyle Julian <[email protected]>
This PR
Updates the code such that it does not rely on any previous registration of a
IFeatureClient. If you fail to specify a Provider and instruct the FeatureBuilder to introduce a policy for determining which provider to use, the code will get stuck infinitely trying to resolveIFeatureClient. For example:Related Issues
Fixes #543
Notes
Follow-up Tasks
How to test