Skip to content

[release/8.0.4xx] Containers - Retry on download blob #48987

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jun 4, 2025

Conversation

surayya-MS
Copy link
Member

@surayya-MS surayya-MS commented May 15, 2025

Fixes #48940

Description/Customer Impact

When building images we often have to pull base image layers from remote sources. These layers can be quite large, and so network interruption can cause the entire build to report failure. Typically we try to retry these operations (e.g. the Copy Task in MSBuild itself), so we should do the same here.

We're forced to use pretty naive retries (operation-level, not chunk-level) because the OCI HTTP API and many popular registries do not support chunked requests well.

Changes made

  1. Copied logic for improved logging in DownloadBlobAsync in case of failure from upgraded logging for #595 log url when connection is closed #44953 (too many commits, something goes wrong when try git cherry-pick)
  2. Modified Registry.DownloadBlobAsync by adding a retry mechanism

Testing

Added unit test for retry mechanism.

Risk

Low - tests have been added and the mechanism is very simple.

@surayya-MS surayya-MS marked this pull request as ready for review May 15, 2025 19:20
@surayya-MS surayya-MS requested a review from a team as a code owner May 15, 2025 19:20
@surayya-MS surayya-MS changed the title Retry on download blob [release/8.0.4xx] Containers - Retry on download blob May 15, 2025
@surayya-MS
Copy link
Member Author

@marcpopMSFT do you know if it is okay to merge this PR now for July release? or should I wait?

@baronfel
Copy link
Member

baronfel commented Jun 4, 2025

Branding is done for July, merging now.

@baronfel baronfel merged commit 6bd6e4a into dotnet:release/8.0.4xx Jun 4, 2025
19 of 21 checks passed
surayya-MS added a commit that referenced this pull request Jun 24, 2025
… closed" pr by #48987 "Containers - Retry on download blob"
surayya-MS added a commit that referenced this pull request Jun 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants