-
Notifications
You must be signed in to change notification settings - Fork 93
feat: Add custom regex_match string comparison #1822
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
✅ Deploy Preview for polite-licorice-3db33c canceled.
|
| self.RegexCache = &map[string]*regexp.Regexp{} | ||
| } | ||
| }() | ||
| selector := store.NewSelector("") |
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 couldn't figure out what the correct selector value should be here!
|
|
Hey thanks for the contribution. As this is adding this logic to flagd itself, a lot of providers also support in-process evaluation. Hence i think we should create an issue, to track all those changes needed for the providers and mostly to have one place for discussions etc. Can you maybe create an issue, or if there is already an issue link it please? |
Thanks @aepfli, I had a quick look before but didn't find one; I'll raise one later! Do providers have the ability to identify when they don't support a particular targeting rule and need to fall-back to the server for evaluation? |
|
Can anyone advise on the SQ code duplication problem: Would you prefer the string comparison tests refactored for less duplication, or would it be better to keep it as-is to keep it simple? If it's the latter, do we need to put that file on the sonar cpd exclusion list? |
We do one or the other, and we do not fallback to server communication if we do in-process. Hence i recommended to create a ticket. As this is a bigger change throughout the ecosystem, which we need to discuss and evaluate. |


This PR
regex_matchjsonlogic string comparisonNotes
I don't code in golang regularly so any feedback appreciated!
Also, completely new to the project, so please let me know if there are any more areas I need to update!
How to test
Use
regex_matchin a flag targeting rule, similar to how you wouldstarts_withetc