-
Notifications
You must be signed in to change notification settings - Fork 615
Added retry for docker pull in e2e-common.sh #11238
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
k8s-ci-robot
merged 1 commit into
kubernetes-sigs:main
from
epam:fix/10296-docker-pull-retry
May 18, 2026
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What was the testing strategy here? Could you present some of the outputs for cases that you managed to simulate? For sure some errors are tricky to simulate, but let's share the output for the easy cases at least.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is the testing strategy I used.
Sources used to compose the regex
MANIFEST_UNKNOWN,DENIED,NAME_UNKNOWN).filesystem layer verification failedon quay.iocontext deadline exceededon ghcr.io's token endpointHow the function was tested
1. Test script that fakes
docker pullReplaces
dockerwith a stand-in we control.Walks through every path: happy case, retry-then-success, all retries exhausted, and three "don't retry" patterns (
manifest unknown,pull access denied,no space left on device).→ Temporary errors retry up to 5× with
1/2/4/8sbackoff; "don't retry" patterns fail after one attempt; happy path unchanged.2.
make test-e2e, forced to fail two waysKUBERAY_VERSION=does-not-exist— non-retriable (tag doesn't exist).KUBERAY_IMAGEpointed at an invalid hostname — retriable, exhaustsall 5 attempts.
→ Both runs behaved as expected. Outputs are presented in the PR description.
3. Regex match against the gathered error patterns
Every error string from the "Sources" section above was run directly through
grep -qiE '<regex>'— both the real CI flake outputs and the docs / OCI patterns that can't easily be reproduced locally.→ Every non-retriable pattern matched; every retriable pattern did not. Both CI flakes (#10296 layer verification, #10257 ghcr.io token timeout) correctly fall through to retry.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sgtm, let's give it a try