Wire RemoteConfigManager refresh on first foreground and identity changes (off by default)#3450
Draft
tonidero wants to merge 2 commits into
Conversation
Contributor
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
This was referenced May 7, 2026
84e939b to
a220a93
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## toniricodiez/fall-back-across-blob-sources #3450 +/- ##
==============================================================================
+ Coverage 79.96% 79.98% +0.02%
==============================================================================
Files 369 369
Lines 14937 14951 +14
Branches 2068 2069 +1
==============================================================================
+ Hits 11944 11959 +15
+ Misses 2154 2153 -1
Partials 839 839 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
191c8ba to
4e3d34d
Compare
a00cdc7 to
8feda35
Compare
4e3d34d to
61a48d6
Compare
61a48d6 to
8c72036
Compare
63a76b2 to
dbef916
Compare
8c72036 to
b3336d9
Compare
dbef916 to
b206de3
Compare
b3336d9 to
bc65ad3
Compare
4 tasks
b206de3 to
ed2adf1
Compare
bc65ad3 to
9705117
Compare
📸 Snapshot Test591 unchanged
🛸 Powered by Emerge Tools |
9705117 to
fe02da5
Compare
49cac31 to
87d6e93
Compare
fe02da5 to
6d89f70
Compare
87d6e93 to
e90d04d
Compare
4e64b90 to
ae9921c
Compare
61eade2 to
a822583
Compare
ae9921c to
6eda732
Compare
a822583 to
0ac6c71
Compare
6eda732 to
4cd0810
Compare
0ac6c71 to
8b87d1a
Compare
4cd0810 to
a29029f
Compare
2 tasks
8b87d1a to
dab20f7
Compare
47a4da1 to
91699e8
Compare
dab20f7 to
87f1fd5
Compare
91699e8 to
d88dd12
Compare
6e1a280 to
c6390a4
Compare
b32ecf1 to
1b90c96
Compare
c6390a4 to
98f0ddd
Compare
1b90c96 to
3049129
Compare
4446628 to
d08fa32
Compare
3049129 to
6a85f55
Compare
…nges (off by default)
Follows the parent-branch change to RemoteConfigManager.updateRemoteConfigIfNeeded which no longer takes an appUserID since the /v2/config endpoint is not user-scoped. The four call sites (onAppForegrounded, logIn onSuccess, logOut success branch, switchUser) become parameterless.
6a85f55 to
4650c71
Compare
d08fa32 to
bf72a8a
Compare
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.

Motivation
Final piece of the initial remote-config wiring: hook
RemoteConfigManagerinto the SDK's actual lifecycle so the topic-fetch pipeline runs on real devices. The earlier PRs in the stack added the network scaffolding (#3435), the manager + topic fetcher (#3437), and the unreferenced-topic cleanup (#3439). None of them invoke the manager — this PR does, behind a developer-only build flag so production traffic is unaffected.Description
RemoteConfigManager(with aTopicFetcher) insidePurchasesFactoryand passes it intoPurchasesOrchestrator.refreshRemoteConfigIfEnabled(appUserID)helper onPurchasesOrchestratorthat callsremoteConfigManager.updateRemoteConfigIfNeeded(...). The helper is invoked from four places, each of which already runs only when something meaningful changed:onAppForegrounded()— only whenstate.firstTimeInForegroundis true (i.e. first foreground afterPurchases.configure(...), exactly once perPurchasesinstance).logIn(...)onSuccess— only reached when the newappUserIDdiffers from the current one.logOut(...)success branch — theappUserIDhas just been replaced with a fresh anonymous id.switchUser(...)— the early-return on the same-id path filters out no-ops before we get here.BuildConfig.ENABLE_REMOTE_CONFIG, fed fromlocal.properties(ENABLE_REMOTE_CONFIG=true). Default:false, so disabling the flag is a no-op at every call site. Mirrors the existingENABLE_EXTRA_REQUEST_LOGGINGpattern.BuildConfig.ENABLE_REMOTE_CONFIGisfalsein CI unit-test builds, so that branch is unreachable from JUnit. Same precedent asENABLE_EXTRA_REQUEST_LOGGING. The on-path is exercised manually viapurchase-testeragainst a localhost backend (combine withREMOTE_CONFIG_BASE_URLfrom Add network scaffolding for remote config endpoint #3435).All new types remain
internal. No public API surface change.Stack
Add remote-config network scaffolding: Add network scaffolding for remote config endpoint #3435Add RemoteConfigManager and TopicFetcher: Add RemoteConfigManager and TopicFetcher #3437Clean up unreferenced topic files after successful remote-config refresh: Clean up unreferenced topic files after successful remote-config refresh #3439Checklist
purchases-ios/ hybrids (deferred — feature is not yet wired to any consumer).