You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a large Github Action workflow that pushes over 600 images up to the GitHub Container Registry.
This mostly works fine, except that I have to set max-parallels based on how many images I expect to be running at a time, and even then sometimes I'm hitting APIs too fast or getting a rare error.
For example:
buildx failed with: ERROR: failed to solve: failed to compute cache key: failed to copy: httpReadSeeker: failed open: unexpected status code https://ghcr.io/v2/swiftotter/den-php-fpm/blobs/sha256:456f646c7993e2a08fbdcbb09c191d153118d0c8675e1a0b29f83895c425105f: 500 Internal Server Error - Server message: unknown
or
buildx failed with: ERROR: failed to solve: failed to compute cache key: failed to copy: read tcp 172.17.0.2:59588->185.199.111.154:443: read: connection timed out
or
buildx failed with: ERROR: failed to solve: failed to do request: Head "https://ghcr.io/v2/swiftotter/den-php-fpm-debug/blobs/sha256:d6b642fadba654351d3fc430b0b9a51f7044351daaed3d27055b19044d29ec66": dial tcp: lookup ghcr.io on 168.63.129.16:53: read udp 172.17.0.2:40862->168.63.129.16:53: i/o timeout
These are all temporary errors that disappear the moment I re-run the job. Instead, what I wish for is that in such cases - like timeouts, or server errors or too many requests errors, that some sort of automated backoff retry system exists, with configurable limitations.
Reacted by Konrad Komorowski, Jon Finerty, Rodrigo Laiola Guimarães, Eirik Stanghelle Morland, Pat, Denis Loginov, Keith Brink, Michael Fridman, Peter Sandtner, Patrik Holčák and 44 more
We are occasionally seeing errors like these as well. For the cache-related ones, I guess an option also could be to continue despite the failure, as writing to the cache probably doesn't constitute a critical failure that would require the entire workflow to fail.
I would like to +1 this! For us, this happens maybe once a day just during continuous deployment (so not counting PRs).
The errors we're seeing look like transient infrastructure errors:
buildx failed with: ERROR: failed to solve: failed to push ghcr.io/<our_org_name>/<our_repo_name>/<our_image_name>:2023.06.14-1605-f0c78f6: failed to copy: failed to do request: Put "https://ghcr.io/v2/<our_org_name>/<our_repo_name>/<our_image_name>/blobs/upload/9508e842-68bb-4779-9f40-6d8cf25357ff?digest=sha256%3A7cb00f153a2766267a4fbe7b14f830de29010a56c96486af21b7b9bf3c8838f0": write tcp 172.17.0.2:35594->140.82.114.33:443: write: broken pipe
Having an internal option to retry the step would be fantastic. We don't want to retry the whole job, as that could mean re-running things that should not be retried, like the test suite.
Reacted by Rodrigo Laiola Guimarães, Trenton H, Dhanshree Arora, Andrej Chomutovskij and Staffan Forsell
We see this too, both on simple container image promotion for Fluent Bit releases - usually pushing to ghcr.io in parallel the 3 supported architectures at least one of them fails - but also when building the multi-arch images which is a huge time sink as it takes a long time to build with QEMU then just fails to push so we have to restart the whole lot again.
+1 on this feature, I get push-related errors around twice a day and retrying usually fixes it:
buildx failed with: ERROR: failed to solve: failed to push europe-west3-docker.pkg.dev/my-project/my-project/my-project:main: failed to authorize: failed to fetch oauth token: unexpected status from GET request to https://europe-west3-docker.pkg.dev/v2/token?scope=repository%3Amy-project%2Fmy-project%my-project%3Apull%2Cpush&service=europe-west3-docker.pkg.dev: 401 Unauthorized
+1 on this feature, I get push-related errors around twice a day and retrying usually fixes it:
buildx failed with: ERROR: failed to solve: failed to push europe-west3-docker.pkg.dev/my-project/my-project/my-project:main: failed to authorize: failed to fetch oauth token: unexpected status from GET request to https://europe-west3-docker.pkg.dev/v2/token?scope=repository%3Amy-project%2Fmy-project%my-project%3Apull%2Cpush&service=europe-west3-docker.pkg.dev: 401 Unauthorized
+1 on this feature, I get push-related errors around twice a day and retrying usually fixes it:
buildx failed with: ERROR: failed to solve: failed to push europe-west3-docker.pkg.dev/my-project/my-project/my-project:main: failed to authorize: failed to fetch oauth token: unexpected status from GET request to https://europe-west3-docker.pkg.dev/v2/token?scope=repository%3Amy-project%2Fmy-project%my-project%3Apull%2Cpush&service=europe-west3-docker.pkg.dev: 401 Unauthorized
Yes, this... We are also still seeing this. A retry solves it. But quite annoying.
#12 ERROR: failed to push 2893***197.dkr.ecr.eu-west-1.amazonaws.com/foo-bar-eu-west-1:0.35.1: unexpected status from HEAD request to https://2893***197.dkr.ecr.eu-west-1.amazonaws.com/v2/foo-bar-eu-west-1/blobs/sha256:f39d714dbb2487f692936bdc0a50902c7806aeedb771f1e8e6a86134eacd3e82: 401 Unauthorized
Except for implementing a retry logic... Is there anything else we can do? This is from a job that only ran 2 workflows in parallel. 1 succeeded, 1 failed.
Retrying the failed one, worked.
Activity
Tenzer commentedon Nov 16, 2022
We are occasionally seeing errors like these as well. For the cache-related ones, I guess an option also could be to continue despite the failure, as writing to the cache probably doesn't constitute a critical failure that would require the entire workflow to fail.
nick-at-work commentedon Jan 12, 2023
We run into this somewhat often. Is a
retry/retriesoption feasible for pushing images?ddelange commentedon Jan 25, 2023
some additional info: https://github.com/ddelange/pycuda/actions/runs/3972373867/jobs/6830922090
these images are each around 2GB+, so a retry might again error if there's no 'resume' ie successful layers don't need to be pushed again
kkom commentedon Jun 14, 2023
I would like to +1 this! For us, this happens maybe once a day just during continuous deployment (so not counting PRs).
The errors we're seeing look like transient infrastructure errors:
Having an internal option to retry the step would be fantastic. We don't want to retry the whole job, as that could mean re-running things that should not be retried, like the test suite.
patrick-stephens commentedon Jun 26, 2023
We see this too, both on simple container image promotion for Fluent Bit releases - usually pushing to ghcr.io in parallel the 3 supported architectures at least one of them fails - but also when building the multi-arch images which is a huge time sink as it takes a long time to build with QEMU then just fails to push so we have to restart the whole lot again.
dinvlad commentedon Jul 25, 2023
I'm seeing this very often now, especially with parallel builds..
This is without any flakiness reported on the GH side: https://www.githubstatus.com
I have tried the pinned versions of Buildkit
v0.10.6andv0.12.0but that didn't seem to help much:#761 (comment)
It would be good to have more resilient retries (with the understanding that 100% reliability is obviously not achievable).
mfridman commentedon Oct 18, 2023
crazy-max commentedon Oct 18, 2023
Does it not work on your side?
Edit: Oh you mean when fetching cache I think right?
mfridman commentedon Oct 18, 2023
mfridman commentedon Oct 20, 2023
I marked my comments above as off-topic since it was an isolated incident related to GCP artifact registry.
However, I'd still +1 this feature request. During that incident, retries would have been extremely useful.
Santas commentedon Nov 10, 2023
Seeing this regularly.
tonynajjar commentedon Mar 1, 2024
+1 on this feature, I get push-related errors around twice a day and retrying usually fixes it:
richaarora01 commentedon Mar 16, 2024
DhanshreeA commentedon Apr 9, 2024
Is this feature under development, or is it still being considered? 👀
tmccoy commentedon Jun 5, 2024
+1, We also experience transient issues that could be handled by retries.
mcbenjemaa commentedon Jun 11, 2024
+1 for backoff retries
eiriksm commentedon Jun 14, 2024
Just wanted to share my solution to this problem. The most naive stuff, wait a minute and try again if it failed.
This has reduced my random failures to almost 0 I must say
koen-venly commentedon Dec 4, 2024
Yes, this... We are also still seeing this. A retry solves it. But quite annoying.
#12 ERROR: failed to push 2893***197.dkr.ecr.eu-west-1.amazonaws.com/foo-bar-eu-west-1:0.35.1: unexpected status from HEAD request to https://2893***197.dkr.ecr.eu-west-1.amazonaws.com/v2/foo-bar-eu-west-1/blobs/sha256:f39d714dbb2487f692936bdc0a50902c7806aeedb771f1e8e6a86134eacd3e82: 401 UnauthorizedExcept for implementing a retry logic... Is there anything else we can do? This is from a job that only ran 2 workflows in parallel. 1 succeeded, 1 failed.
Retrying the failed one, worked.
zhengcan commentedon Sep 18, 2026
This issue is 4 years old. It's really useful for everyone.