Repository navigation
fix(rum): keep remote settings across app upgrades - #37
Merged
Merged
Conversation
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.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
RemoteConfigStore.buildStoreKeybuilt the key fromhost | applicationId | service | env | version, withversionbeing 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
app_versionis still sent on the request.sweepAbandoned()removes those entries once they go unrefreshed. Its KDoc is updated.Verification
./gradlew :features:dd-sdk-android-rum:testDebugUnitTest --tests '*RemoteConfig*':RemoteConfigStoreTest22/22 andRemoteConfigControllerTest78/78.context.versionback in the key, the 3 new tests fail.🤖 Generated with Claude Code