Skip to content
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

impl: add a retry with result function (#2837) #2853

Merged

Conversation

alevenberg
Copy link
Contributor

@alevenberg alevenberg commented Nov 14, 2023

Second part of the attempt to fix #1717

Description

Adds a retry loop for the remote image download

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

  • Includes unit tests
  • Adds integration tests if needed.

See the contribution guide for more details.

I'm not sure the best way to test the changes. Any suggestions?

Reviewer Notes

  • The code flow looks good.
  • Unit tests and or integration tests added.

Release Notes

  • kaniko adds a new flag --image-download-retry to retry when downloading an image

* impl: add a retry with result function

* fix ci errs
Copy link
Collaborator

@JeromeJu JeromeJu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR, the codes look good. Would you mind adding some more tests for examining the expected behaviour?

@alevenberg
Copy link
Contributor Author

Added unit tests. I ran go test pkg/image/remote/remote_test.go pkg/image/remote/remote.go to verify the unit test and
find . -name "*.go" | grep -v vendor/ | xargs gofmt -l -s -w to lint the files

README.md Outdated Show resolved Hide resolved
@aaron-prindle
Copy link
Collaborator

Left one nit comment, once that is resolved we should be able to merge this 🎊

@alevenberg
Copy link
Contributor Author

Done! Thanks for the reviews 👍

@aaron-prindle aaron-prindle merged commit 6b7604e into GoogleContainerTools:main Nov 20, 2023
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

failed to get filesystem from image: connection reset by peer
3 participants