Add retry_count to container_push
PR Checklist
Please check if your PR fulfills the following requirements:
- [ ] Tests for the changes have been added (for bug fixes / features)
- [x] Docs have been added / updated (for bug fixes / features)
PR Type
What kind of change does this PR introduce?
- [ ] Bugfix
- [x] Feature
- [ ] Code style update (formatting, local variables)
- [ ] Refactoring (no functional changes, no api changes)
- [ ] Build related changes
- [ ] CI related changes
- [ ] Documentation content changes
- [ ] Other... Please describe:
What is the current behavior?
Currently, if an image fails to push, it will immediately fail. While this makes sense for single image pushes, it's not ideal when pushing multiple containers as often this means running the entire build step again.
Issue Number: #1989 (related)
What is the new behavior?
Adds a retry_count attribute to container_push. If the push fails, it will be retried until the retry_count is reached. On each retry, a log line will be printed to show the error that occurred as well as which attempt it was.
Does this PR introduce a breaking change?
- [ ] Yes
- [x] No
Other information
I've updated the docs to include the new attribute but I'm not sure if there are tests that cover it. I'm happy to add the tests but I might need some guidance as to where and how to implement them!
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
View this failed invocation of the CLA check for more information.
For the most up to date status, view the checks section at the bottom of the pull request.
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
View this failed invocation of the CLA check for more information.
For the most up to date status, view the checks section at the bottom of the pull request.
Done but I can't re-run the check to clear the failure
I've found the container_push tests in tests/container/BUILD but I'm not sure how to test it properly as it would require a push to fail one or more times and then succeed
@itmecho Friendly ping :-)
@itmecho Friendly ping :-)
Oh sorry! I thought this commit covers that validation?
https://github.com/bazelbuild/rules_docker/commit/4e540514fef7ddd56121f81c481993ab9d3843f6
Is that no good or is there something else I've missed?
This Pull Request has been automatically marked as stale because it has not had any activity for 180 days. It will be closed if no further activity occurs in 30 days. Collaborators can add an assignee to keep this open indefinitely. Thanks for your contributions to rules_docker!
@itmecho do you have time to wrap this up? If not, happy to pick this up!
@itmecho do you have time to wrap this up? If not, happy to pick this up!
@com6056 Sorry for the delay! I've pushed some validation and a doc update, hopefully that covers it!
The build looks like it's failing on something to do with docker/debian9? Not sure if that's related to my changes or not...
@itmecho do you have time to wrap this up? If not, happy to pick this up!
@com6056 Sorry for the delay! I've pushed some validation and a doc update, hopefully that covers it!
The build looks like it's failing on something to do with docker/debian9? Not sure if that's related to my changes or not...
@uhthomas any idea why that build is failing or who we can ask about it?