- 
                Notifications
    
You must be signed in to change notification settings  - Fork 11
 
fix!: flagd, behavioral tests conformance (evaluation and config) #76
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
          Summary of ChangesHello @erenatas, 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 modernizes the project by updating to the Rust 2024 edition and bringing various dependencies to their latest versions. It introduces significant enhancements to the  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 introduces a number of significant improvements and fixes across the flagd and env-var crates. Key changes include upgrading to the Rust 2024 edition, updating numerous dependencies, and most notably, a major refactoring of the in-process targeting engine to use datalogic-rs v4. This refactoring has greatly improved the code's safety and clarity, especially in the fractional and semver targeting operators.
The behavioral tests have also been substantially improved for better conformance and reliability. The use of test-with and temp-env to manage environment variables in tests is a great change that addresses potential flakiness from parallel test execution.
I have one suggestion in crates/flagd/src/resolver/in_process/resolver/grpc.rs to improve code consistency in cache handling, bringing it in line with the FileResolver. Overall, this is a high-quality pull request with excellent changes.
Signed-off-by: Eren Atas <[email protected]>
Signed-off-by: Eren Atas <[email protected]>
Signed-off-by: Eren Atas <[email protected]>
Signed-off-by: Eren Atas <[email protected]>
Signed-off-by: Eren Atas <[email protected]>
Signed-off-by: Eren Atas <[email protected]>
Signed-off-by: Eren Atas <[email protected]>
Signed-off-by: Eren Atas <[email protected]>
3142335    to
    f5c6a3b      
    Compare
  
    | 
               | 
          ||
| if options.source_configuration.is_some() && options.resolver_type != ResolverType::Rpc { | ||
| let resolver_env_set = std::env::var("FLAGD_RESOLVER").is_ok(); | ||
| if options.source_configuration.is_some() && !resolver_env_set { | 
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.
should we also add a check here that source_configuration needs to be set, if the ResolverType is file?
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.
Thank you very much! I updated it.
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.
i am not sure i can really provide a review - i have no clue about rust, i just saw that this behaviour was missing, but i can give it a shot
Signed-off-by: Eren Atas <[email protected]>
Signed-off-by: Eren Atas <[email protected]>
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.
I'm in the same boat as @aepfli. I don't know Rust well enough to be confident in my review but the change is relatively straightforward and looks okay to me.
This PR
This change may be breaking to existing users
If both
FLAGD_OFFLINE_FLAG_SOURCE_PATHandFLAGD_RESOLVERwere set,FLAGD_OFFLINE_FLAG_SOURCE_PATHoverrode the resolver type to File, ignoringFLAGD_RESOLVER.What is done now:
FLAGD_RESOLVERtakes precedence. If set, it is respected andFLAGD_OFFLINE_FLAG_SOURCE_PATHdoes not override the resolver type to File.Add evaluation behavioral tests as well, did not require any change in implementation except error mapping with expectation
Related Issues
Improves #43
Notes
Follow-up Tasks
How to test