Use short timeouts for remote config blob downloads#7210
Merged
Conversation
Member
Author
|
@RCGitBot please test |
rickvdl
force-pushed
the
rickvdl/remote-config-blob-timeouts
branch
from
July 14, 2026 14:15
71bd1fb to
3a45da0
Compare
rickvdl
commented
Jul 14, 2026
| expect(self.blobStore.invokedWriteParameters?.data) == payload | ||
| } | ||
|
|
||
| func testRealDownloaderUsesFiveSecondTimeoutAndRetriesNextSourceAfterTimeout() async { |
Member
Author
There was a problem hiding this comment.
This doesn't actually verify the timeout, but that is rather tricky here (we could assert that the user config uses a 5s timeout here, but I'm not sure if that adds much value here? Happy to add it though).
But I realized we don't have a timeout test case at all, so felt like adding this one
ajpallares
approved these changes
Jul 14, 2026
ajpallares
left a comment
Member
There was a problem hiding this comment.
Makes sense! Thanks for adding this!
rickvdl
enabled auto-merge (squash)
July 14, 2026 14:18
This was referenced Jul 15, 2026
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.
We previously used the default session configuration through
URLSessions.shared, which uses a default timeout of 60s. This is rather high, and Android already uses a shorter 5s timeout, so with this PR we bring this in line. We'll use multiple sources for the blob downloads, so a lower timeout should also ensure we'll fallback to the next source sooner.In a follow up PR (#7185) we'll actually implement dynamic timeouts based on the provided sources as well.
Note
Low Risk
Narrow networking tuning for remote config blobs with faster failure on slow hosts; behavior change is intentional alignment with multi-source fallback, not auth or payment paths.
Overview
Remote config blob downloads no longer use
URLSession.sharedand its ~60s default timeouts.URLSessionRemoteConfigBlobDownloadernow builds a dedicatedURLSessionwhose request and resource timeouts are both 5 seconds, matching Android and speeding failover when multiple blob sources are configured.A new integration-style unit test stubs a primary URL with
URLError.timedOutand a backup with a successful response, assertingRemoteConfigBlobFetcherstill completes and persists the blob via the real downloader.Reviewed by Cursor Bugbot for commit 3a45da0. Bugbot is set up for automated code reviews on this repo. Configure here.