build-push-action: Issue with push to GHCR - buildx failed with: error: failed to solve: failed to copy: cannot reuse body, request must be retried
Troubleshooting
Before submitting a bug report please read the Troubleshooting doc.
Behaviour
Steps to reproduce this issue
- Start the run via GH Actions to build and push a new image for two architectures to GitHub packages
- Error occurs in more than 50% of the runs
GitHub status was green when executing the run
Expected behaviour
The build and push should push the new image(s) to the GitHub registry
Actual behaviour
The build works, but pushing the image results in the error
buildx failed with: error: failed to solve: failed to copy: cannot reuse body, request must be retried
This is also reported in #452 which was closed referencing the GH issue this morning. However the error also occurs when the GH packages are in operational state. As proposed here is a new issue for the same error with the logs attached
Configuration
- Repository URL (if public): https://github.com/SAP-samples/btp-setup-automator
- Build URL (if public): https://github.com/SAP-samples/btp-setup-automator/actions/runs/2421754052
- Workflow: https://github.com/SAP-samples/btp-setup-automator/blob/main/.github/workflows/docker-build-and-push.yml
Logs
Attached: log_build_and_push.txt
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 3
- Comments: 19 (5 by maintainers)
We have sent a message to the GitHub team about this issue. Will keep you in touch.
I put a thread here on the discourse, hoping it’s a better way to make it googleable and to provide evidence it’s not just us. @jauderho @lechnerc77 if you’d like to reply or +1 it that might help? The thread. https://github.community/t/ghcr-repeatedly-fails-during-docker-image-push-failed-to-solve-cannot-reuse-body-request-must-be-retried/254087
By the way, this still happens every now and then.
Here’s two examples:
I’m also doing this for both GHCR and Docker Hub, yet it only happens with the former.
I do get a feeling that it might be an issue with availability, in which case perhaps it would be worth it to add a retry functionality to this action? Considering the build time usually takes significantly longer than the push time, it is a little unfortunate that I have to go through the build process again every time the push fails.
@TwiN @jerivas Looks related to https://github.com/docker/build-push-action/issues/761. See https://github.com/docker/build-push-action/issues/761#issuecomment-1383822381 for a temporary workaround.
@jauderho This doesn’t look related to ghcr. You can raise a support ticket for the actions team. Thanks