Skip to content

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

Merged
merged 1 commit into from
Jul 15, 2025

Conversation

athiramanu
Copy link

Hey there! So you want to contribute to a Firebase SDK?
Before you file this pull request, please read these guidelines:

Discussion

  • Read the contribution guidelines (CONTRIBUTING.md).
  • If this has been discussed in an issue, make sure to link to the issue here.
    If not, go file an issue about this before creating a pull request to discuss.

Testing

  • Make sure all existing tests in the repository pass after your change.
  • If you fixed a bug or added a feature, add a new test to cover your code.

API Changes

  • At this time we cannot accept changes that affect the public API. If you'd like to help
    us make Firebase APIs better, please propose your change in an issue so that we
    can discuss it together.

@athiramanu athiramanu force-pushed the ssrc-custom-signals branch from 5fbbede to 2c9a88a Compare June 25, 2025 12:04
@athiramanu athiramanu requested a review from lahirumaramba June 25, 2025 12:06
Copy link
Member

@lahirumaramba lahirumaramba left a 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)
Copy link
Member

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)

Copy link
Member

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?

Copy link
Author

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

@lahirumaramba lahirumaramba added the release:stage Stage a release candidate label Jul 14, 2025
@athiramanu athiramanu force-pushed the ssrc-custom-signals branch from 2c9a88a to af99b87 Compare July 15, 2025 14:03
@athiramanu athiramanu merged commit e8199c2 into ssrc Jul 15, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:stage Stage a release candidate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants