-
Notifications
You must be signed in to change notification settings - Fork 26
test(e2e): add retry logic for image pulling #377
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
base: main
Are you sure you want to change the base?
Conversation
👷 Deploy Preview for urunc processing.
|
✅ Deploy Preview for urunc canceled.
|
3839d39 to
30a4a30
Compare
cmainas
left a comment
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.
Thank you @codesmith25103 for this change, I have added a few comments, but most importantly, I think we can improve the changes by simply creating a new function that handles the retry logic instead of changing the pullImageForTest function.
tests/e2e/setup_test.go
Outdated
| var err error | ||
| maxRetries := 5 | ||
|
|
||
| for i := 0; i < maxRetries; i++ { |
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.
I think we can improve the doe here, by simply creating a new function which implements the retry logic and calling pullImageForTest and hence we do not have to change pullImageForTest
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.
Hi @cmainas, I’ve implemented a new function with retry support (PullImageWithRetry) which wraps pullImageForTest. Should I update the codebase to call PullImageWithRetry wherever pullImageForTest is currently used?
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.
Yes, we should replace pullImageForTest
Currently, end-to-end tests fail intermittently during the setup phase due to image pulling failures (e.g., registry timeouts or network issues). This commit adds a retry mechanism with exponential backoff to the image pulling logic in the test setup. It attempts to pull the required images up to 5 times before failing the test. Signed-off-by: Sankalp <[email protected]>
81c0898 to
37647cb
Compare
test(e2e): add retry logic for image pulling
Currently, end-to-end tests fail intermittently during the setup phase
due to image pulling failures (e.g., registry timeouts or network
issues).
This commit adds a retry mechanism with exponential backoff to the
image pulling logic in the test setup. It attempts to pull the required
images up to 5 times before failing the test.
Fixes: #376