Skip to content

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

Merged
Fiona2016 merged 1 commit into
publishfrom
fix/remote-config-key-without-app-version
Oct 18, 2026
Merged

Fiona2016 merged 1 commit into
publishfrom
fix/remote-config-key-without-app-version

Conversation

@Fiona2016

Copy link
Copy Markdown
Collaborator

Problem

RemoteConfigStore.buildStoreKey built the key from host | applicationId | service | env | version, with version being the app version. The first session after every app upgrade therefore found no stored entry, was drawn on the init values, and had no settings version to report.

Change

  • The app version is dropped from the key. An installed app runs one version at a time, so the previous release's stored settings are a better answer than the init values until the new fetch is stored.
  • This matches the iOS SDK, whose cache key leaves the application version out for the same reason.
  • app_version is still sent on the request.
  • Entries written under the old layout can no longer be reached. The storage format is unchanged, so the prefix is not bumped. The existing age-based sweepAbandoned() removes those entries once they go unrefreshed. Its KDoc is updated.

Verification

  • ./gradlew :features:dd-sdk-android-rum:testDebugUnitTest --tests '*RemoteConfig*': RemoteConfigStoreTest 22/22 and RemoteConfigControllerTest 78/78.
  • New tests:
    • same key across app versions;
    • the key still differs by applicationId, env and service;
    • a value stored under one app version is read after the version changes.
  • Sweep tests now use a legacy version-suffixed key.
  • Negative control: with context.version back in the key, the 3 new tests fail.
  • ktlint and detekt were not run locally.

🤖 Generated with Claude Code

The remote configuration store key included the application version, so
the first session after every app upgrade found no stored entry and was
drawn on the init values, without a settings version to report.

An installed app runs one version at a time, and the previous release's
stored settings are a better answer than the init values until the new
fetch is stored. The key is now built from endpoint host, application
id, service and environment only.

Entries written under the old layout (key ending in the app version) are
no longer reachable. The storage format is unchanged, so the key prefix
is not bumped; those entries are removed by the existing age-based
sweep once they have gone unrefreshed. The sweep documentation now
describes this.
@Fiona2016
Fiona2016 merged commit 48cda8a into publish Oct 18, 2026
2 checks passed
@Fiona2016 Fiona2016 mentioned this pull request 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