Skip to content

fix(remoteconfig) Support ABT realtime when variant value matches default value of parameter#10000

Open
athiramanu wants to merge 6 commits into
mainfrom
exp-realtime
Open

fix(remoteconfig) Support ABT realtime when variant value matches default value of parameter#10000
athiramanu wants to merge 6 commits into
mainfrom
exp-realtime

Conversation

@athiramanu
Copy link
Copy Markdown
Contributor

@athiramanu athiramanu commented May 25, 2026

When an experiment is added whose variant value matches default value, the parameter key is not listed as updated. This becomes a problem when the client app calls activate only on config change as the experiment will not get started

Before fix - https://screencast.googleplex.com/cast/NDgxNTYwNjU0NDA3MjcwNHxiOWY1MmIyNy1iMQ
After fix - https://screencast.googleplex.com/cast/NDcxODUwODQ0MDAyNzEzNnwzODc2YTRlMC01MA

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 25, 2026

🦋 Changeset detected

Latest commit: c01f02b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@firebase/remote-config Patch
firebase Patch
@firebase/remote-config-compat Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a 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 support for rollout and personalization metadata in Remote Config, updating the API definitions, REST client, and realtime handler to process these new fields. Several critical issues were identified in the realtime update logic: the previous fetch response is retrieved from storage after it has likely been overwritten by the new fetch, and the comparison logic for experiments and rollouts only checks for changes in affected parameter keys while ignoring variant ID changes. Additionally, it is recommended to refactor the duplicated comparison logic for experiments and rollouts into a shared helper method.

Comment thread packages/remote-config/src/client/realtime_handler.ts Outdated
Comment thread packages/remote-config/src/client/realtime_handler.ts Outdated
Comment thread packages/remote-config/src/client/realtime_handler.ts Outdated
@athiramanu athiramanu force-pushed the exp-realtime branch 6 times, most recently from fce6f2a to 573ddc3 Compare May 25, 2026 12:57
@athiramanu athiramanu changed the title Exp realtime fix(remoteconfig) Support ABT realtime when variant value matches default value of parameter May 25, 2026
@athiramanu athiramanu marked this pull request as ready for review May 25, 2026 14:40
@athiramanu athiramanu requested review from a team and erikeldridge as code owners May 25, 2026 14:40
Comment thread packages/remote-config/src/client/realtime_handler.ts Outdated
Comment thread packages/remote-config/src/client/realtime_handler.ts Outdated
Comment thread packages/remote-config/src/client/realtime_handler.ts Outdated
Comment thread packages/remote-config/src/client/realtime_handler.ts Outdated
@athiramanu athiramanu force-pushed the exp-realtime branch 7 times, most recently from 5f6fe15 to 03fc5b9 Compare May 26, 2026 10:01
Copy link
Copy Markdown
Contributor

@hsubox76 hsubox76 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs a changeset - especially in case it doesn't make it into this week's release.

@athiramanu athiramanu requested review from a team as code owners May 27, 2026 01:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants