Skip to content

fix(rum): keep remote settings across app upgrades - #46

Closed
Fiona2016 wants to merge 1 commit into
publishfrom
fix/remote-config-key-without-app-version
Closed

Fiona2016 wants to merge 1 commit into
publishfrom
fix/remote-config-key-without-app-version

Conversation

@Fiona2016

Copy link
Copy Markdown
Collaborator

Problem

RemoteConfigStore.buildStoreKey keyed the stored remote settings by host | applicationId | service | env | version, with version being the app version. Every app upgrade therefore found no stored entry. The first session after the upgrade was drawn on the init values and reported no settings version, until the next session read the freshly fetched copy.

Change

  • The key no longer includes the app version. An installed app runs one version at a time, so the previous release's stored settings are the better answer for the first session after an upgrade.
  • This matches the iOS SDK, whose cache key leaves the application version out for the same reason.
  • Entries written under the old key are no longer read. The first session after upgrading the SDK uses the init values once.

Verification

  • node scripts/unit-node/run.mjs: 280 passed.
  • New tests:
    • the key is the same across app versions;
    • the key still separates applications and environments;
    • values stored under 1.0.0 are read under 2.0.0.
  • Negative control: with context.version back in the key, the 2 version tests fail.
  • The hvigor build gate (scripts/ci-check.sh) was not run locally.

🤖 Generated with Claude Code

The remote configuration cache key included the app version, so every app
upgrade found no stored entry. The first session after the upgrade was drawn
on the init values and reported no settings version, until the next session
read the freshly fetched copy.

An installed app runs one version at a time and the console has no per-version
targeting, so the previous release's stored settings are a better answer for
that first session than the init values. The key is now built from host,
application id, service and env only.

Entries written under the old key are no longer read; they are a few hundred
bytes and the next fetch stores a fresh one under the new key.
@Fiona2016

Copy link
Copy Markdown
Collaborator Author

Ran scripts/ci-check.sh locally against this branch (the build-gate job is disabled in CI): all hvigor HAR/HAP builds succeed.

@Fiona2016

Copy link
Copy Markdown
Collaborator Author

Superseded by #47: the same change cherry-picked onto main and released as 0.7.1 through the usual main → publish path.

@Fiona2016 Fiona2016 closed this Oct 18, 2026
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.

1 participant