Skip to content

Conversation

@codesmith25103
Copy link
Contributor

@codesmith25103 codesmith25103 commented Jan 11, 2026

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

@netlify
Copy link

netlify bot commented Jan 11, 2026

👷 Deploy Preview for urunc processing.

Name Link
🔨 Latest commit 8f9c983
🔍 Latest deploy log https://app.netlify.com/projects/urunc/deploys/6963a5c52b1004000802b351

@netlify
Copy link

netlify bot commented Jan 11, 2026

Deploy Preview for urunc canceled.

Name Link
🔨 Latest commit 37647cb
🔍 Latest deploy log https://app.netlify.com/projects/urunc/deploys/696916d20b0c6f0008149b0a

Copy link
Contributor

@cmainas cmainas left a 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.

var err error
maxRetries := 5

for i := 0; i < maxRetries; i++ {
Copy link
Contributor

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

Copy link
Contributor Author

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?

Copy link
Contributor

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]>
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.

Retry to pull images that could be pulled during the setup of end-to-end testing

2 participants