feat: Add support for Flagd-Selector header when syncing flags with InProcess resolver#604
Conversation
Signed-off-by: Kyle Julian <38759683+kylejuliandev@users.noreply.github.com>
Summary of ChangesHello, 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 enhances the InProcess resolver for Flagd by introducing the capability to utilize the 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 adds support for the Flagd-Selector header when using the InProcess resolver, which is a good feature enhancement. The implementation correctly sends both the new header and the obsolete Selector property for backward compatibility. The associated tests have been updated to verify this new behavior.
askpt
left a comment
There was a problem hiding this comment.
LGTM. I am just wondering if we can change this to use the new behaviour instead of marking as warning disable.
| #pragma warning disable CS0612 // Type or member is obsolete | ||
| var request = new SyncFlagsRequest() | ||
| { | ||
| Selector = this._config.SourceSelector | ||
| }; | ||
| #pragma warning restore CS0612 // Type or member is obsolete |
There was a problem hiding this comment.
I wonder if there is an alternative for this (instead of ignoring the warning).
This PR
Builds on #595 by adding updating the flagd schemas submodule and adds support for sending a SyncFlags gRPC request with a
Flagd-Selectorheader. We need to supress the obsoleteSelector = this._config.SourceSelectorproperty so it will continue to build but this allows us to utilise both methods. The gRPC Header takes precendence and theselectorin the protbuf body is being deprecated.Related Issues
Notes
Follow-up Tasks
How to test