feat!: Update setProvider to be async and remove setProviderAndWait #695#1344
feat!: Update setProvider to be async and remove setProviderAndWait #695#1344ScottVenkataraman wants to merge 4 commits intoopen-feature:mainfrom
setProvider to be async and remove setProviderAndWait #695#1344Conversation
…ready or is rejected if the provider fails during initialization. Remove `setProviderAndWait` Update the documentation in the readme Signed-off-by: Scott Venkataraman <scottvenkataraman22@gmail.com>
Summary of ChangesHello @ScottVenkataraman, 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 refactors the core Highlights
Changelog
Activity
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.
Code Review
This pull request is a great step towards simplifying the API by making setProvider asynchronous and removing the setProviderAndWait method. The changes are applied consistently across the codebase, including tests and documentation. I've identified a critical issue in the Angular module where the new asynchronous nature of setProvider isn't correctly handled, potentially leading to unhandled promise rejections. Additionally, there's a minor documentation clarification I've suggested for better readability. Overall, this is a valuable contribution.
-Grammatical edit to packages/web/README.md -Add catch to async call in angular module, as well as replace .map with .forEach. Signed-off-by: Scott Venkataraman <scottvenkataraman22@gmail.com>
setProvider to be async and remove setProviderAndWait #695setProvider to be async and remove setProviderAndWait #695
lukas-reining
left a comment
There was a problem hiding this comment.
Thank you for the change @ScottVenkataraman!
We can not merge this immediately due to the other changes discussed for the 2.0 release. #799
Once we get to this point, we will happily include this!
@open-feature/sdk-javascript-maintainers @open-feature/sdk-javascript-maintainers
setProvider to be async and remove setProviderAndWait #695setProvider to be async and remove setProviderAndWait #695
This PR
setProviderto return a promise that's resolved when the provider is ready or is rejected if the provider fails during initialization.setProviderAndWaitRelated Issues
Fixes #695
Notes
This is my first PR for Open Feature, please let me know if I missed something in the contributing process or need to make any changes.