cache: add retry_mode and retry_max_attempts options to s3 cache#6657
Merged
crazy-max merged 1 commit intomoby:masterfrom Apr 7, 2026
Merged
cache: add retry_mode and retry_max_attempts options to s3 cache#6657crazy-max merged 1 commit intomoby:masterfrom
crazy-max merged 1 commit intomoby:masterfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds user-configurable AWS SDK retry behavior to the S3 remote cache backend, addressing the need to tune reliability in less-stable S3/S3-compatible environments (issue #6252).
Changes:
- Document new S3 cache options
retry_modeandretry_max_attempts. - Parse
retry_mode/retry_max_attemptsfrom cache attributes into the S3 cache config. - Apply the configured retry mode / max attempts when constructing the S3 client.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| README.md | Documents new S3 cache retry options (and includes minor formatting tweaks). |
| cache/remotecache/s3/s3.go | Adds config fields + attribute parsing and applies retry settings to the S3 client options. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Add configurable retry behavior for the S3 cache. Users can now set `retry_mode` (standard/adaptive) and `retry_max_attempts` to tune AWS SDK retry settings for their environment. When not specified, the AWS SDK defaults apply (standard mode, 3 max attempts). Signed-off-by: Jiří Moravčík <jiri.moravcik@gmail.com>
9e629ff to
2828e47
Compare
tonistiigi
approved these changes
Apr 6, 2026
Member
|
vlaidate-doctoc ci issue not related, fixed in #6660 |
crazy-max
approved these changes
Apr 7, 2026
Member
|
needs docs follow-up at https://docs.docker.com/build/cache/backends/s3/#synopsis (cc @dvdksn) |
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.
This PR adds configurable retry behavior for the S3 cache.
Users can now set
retry_mode(standard/adaptive) andretry_max_attemptsto tune AWS SDK retry settings for their environment. When not specified, the AWS SDK defaults apply (standard mode, 3 max attempts).Closes #6252
Left to discuss: I think it would be possible to allow passing in
0as the number of attempts, which would translate to infinite retries, which doesn't feel that useful to me... but still worth considering.