-
Notifications
You must be signed in to change notification settings - Fork 299
Implement custom signal support for server side remote config #1108
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
Conversation
5fbbede to
2c9a88a
Compare
lahirumaramba
left a comment
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! Added a couple comments
| (customSignal, targetSignal) -> customSignal.equals(targetSignal)); | ||
| case STRING_CONTAINS_REGEX: | ||
| return compareStrings(targetCustomSignalValues, customSignalValue, | ||
| (customSignal, targetSignal) -> Pattern.compile(targetSignal) |
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.
Does it make sense to compile and cache this (if we expect this to be used more frequently)
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 wrap this in a try-catch? Could this throw java.util.regex.PatternSyntaxException?
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.
Skipping the caching part since the tagret signal compilation happens once for every request call. The function is moved to a try catch block where in case of error, it evaluates to false
2c9a88a to
af99b87
Compare
* Implementation for Fetching and Caching Server Side Remote Config (#1107)009 * Implementation for Fetching and Caching Server Side Remote Config * implementation of fetch , cache and load of template --------- Co-authored-by: Varun Rathore <[email protected]> * Implement custom signal targeting for server side RC (#1108) Co-authored-by: Athira M <[email protected]> * Implement percent evaluation for server side RC (#1114) * [feat] Implement percent evaluation for server side RC * Ssrc bugbash fix (#1117) * Handle empty context * fix issue related to update time * fix string equality * fix textcase * Fix lint errors * Add unit tests * fix for [438426692](getDouble() logs a malformed warning on type conversion failure) Using getDouble on a string parameter value, returns the appropriate default static value but logs a warning which looks incorrect ("%s" in the warning message?). * Update ServerTemplateResponse.java to fix b/438607881 In the server template builder flow using cached template, evaluation using custom signals is not working as intended. * Update getServerRemoteConfig.json to fix b/438607881 * Update getServerTemplateData.json to fix b/438607881 * fix for bugs * Resolve comment related to revert of ServerVersion Class * remove serverVersion * Resolve comments related to Evaluator * fix indentation * fix indentation * fix indentations * fix multi line indent * fix multi line indents * Update ConditionEvaluator.java * Update ConditionEvaluator.java --------- Co-authored-by: Athira M <[email protected]> Co-authored-by: Varun Rathore <[email protected]> * Create ParameterValueTest.java * Fix typo errors * Change return type and cache regex * Addressed comment to make cache atomic * Trigger CI --------- Co-authored-by: Varun Rathore <[email protected]> Co-authored-by: Athira M <[email protected]> Co-authored-by: Athira M <[email protected]>
Hey there! So you want to contribute to a Firebase SDK?
Before you file this pull request, please read these guidelines:
Discussion
If not, go file an issue about this before creating a pull request to discuss.
Testing
API Changes
us make Firebase APIs better, please propose your change in an issue so that we
can discuss it together.