-
Notifications
You must be signed in to change notification settings - Fork 66
feat(optimizely)!: Optimizely provider concepts updates #1658
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: liran2000 <liran2000@gmail.com>
Summary of ChangesHello @liran2000, 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 Optimizely Java provider to enhance its feature flag evaluation capabilities and align with the concepts established in the Go provider. The changes enable direct support for various data types in flag evaluations and introduce a flexible way to select specific variables within Optimizely flags, thereby improving the provider's functionality and consistency across different OpenFeature SDKs. 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 significantly improves the Optimizely provider by aligning it with modern concepts, particularly using feature variables for typed evaluations. This is a great step forward for functionality. The code changes are well-supported by updated documentation and a comprehensive new test suite.
I've identified a critical issue across the new evaluation methods (getStringEvaluation, getIntegerEvaluation, getDoubleEvaluation, getObjectEvaluation) where a null default value could lead to a NullPointerException. I've provided specific suggestions to make these methods more robust. Additionally, I've suggested adding test cases to cover this scenario and pointed out an opportunity to reduce code duplication for better maintainability. Addressing these points will solidify the provider's reliability.
...ptimizely/src/main/java/dev/openfeature/contrib/providers/optimizely/OptimizelyProvider.java
Show resolved
Hide resolved
...ptimizely/src/main/java/dev/openfeature/contrib/providers/optimizely/OptimizelyProvider.java
Show resolved
Hide resolved
...ptimizely/src/main/java/dev/openfeature/contrib/providers/optimizely/OptimizelyProvider.java
Show resolved
Hide resolved
...ptimizely/src/main/java/dev/openfeature/contrib/providers/optimizely/OptimizelyProvider.java
Show resolved
Hide resolved
...ptimizely/src/main/java/dev/openfeature/contrib/providers/optimizely/OptimizelyProvider.java
Show resolved
Hide resolved
...izely/src/test/java/dev/openfeature/contrib/providers/optimizely/OptimizelyProviderTest.java
Show resolved
Hide resolved
|
@liran2000 I'll review and possibly merge this tomrrow. |
...ptimizely/src/main/java/dev/openfeature/contrib/providers/optimizely/OptimizelyProvider.java
Show resolved
Hide resolved
|
@liran2000 do you think it makes sense (to align even more with the Go implementation) that we should take an optimizely client instance instead of a config? This also might be less brittle in terms of new options, etc. If so, just be careful of this. |
@toddbaert I think than config fits better here. |
Align with Go provider, see discussion.