-
Notifications
You must be signed in to change notification settings - Fork 28
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
issue pushing image: BLOB_UNKNOWN: Manifest references unknown blob(s) #385
Comments
cc @mafredri |
I wonder if one of the blobs we previously pushed has been deleted due to age? Need to figure out how to reliably reproduce. |
related: i'm not sure if a failed push should prevent the user from entering their workspace. can this fail gracefully while also alerting devs/admins of the problem? |
It definitely shouldn't! EDIT: Actually, there may situations where it's warranted. If you plan to run envbuilder in a CI/CD workflow, then you would want to know that pushing the image failed. We would need to be able to differentiate if pushing the image is a requirement or if pushing the image is a nice side-effect. |
I am also experiencing a similar issue: I wonder why this is happening with harbor. There is definitely no GC going on in my default harbor setup. Has any of you an idea what might be going on here? |
I can reproduce this locally as well with I can also reproduce this issue with Strangely enough, I can see the blob on the registry filesystem before pushing, and it's just an empty file:
|
Querying the registry v2 HTTP API locally, I can see that it is indeed missing despite the layers being on disk:
would return a HTTP 404 Not Found response. After manually uploading the blob via cURL:
the previous HEAD request returned a 200 OK response. Based on the above, it looks like we're just failing to upload that particular blob. Looking further. |
Relates to #385 This commit adds an option ENVBUILDER_EXIT_ON_PUSH_FAILURE that controls the previous behaviour of exiting with an error if ENVBUILDER_PUSH_IMAGE was set to a truthy value and we failed to push the image. - Before, Envbuilder would always exit with an error on a failed push. - Now, Envbuilder will only exit with an error if ENVBUILDER_EXIT_ON_PUSH_FAILURE is set to a truthy value. - Otherwise, Envbuilder will continue building the image and executing ENVBUILDER_INIT_SCRIPT even if push fails.
Images of type application/vnd.docker.image.rootfs.diff.tar.gzip seem to break when you try to push metadata-only layers and the layers all share the same hash. This doesn't seem to be a problem with OCI images. Ref: coder/envbuilder#385
Hey guys, I am waiting for this PR because I could not make caching work in envbuilder test setup for coder. What is the current state of this issue? Is it a known bug with a solution in the making or are there only workarounds like the force flag? |
Hey @MartinLoeper, sorry you're running into this issue. Are you looking to cache the built image (can be used via If it's the latter, you can simply use In the meantime, I think I have a jank workaround for you. It'd be nice if you could try it out and confirm whether or not it works. Given the following:
The workaround is the following: docker pull codercom/code-server:latest
docker tag codercom/code-server:latest localhost:5000/cache:latest
docker push localhost:5000/cache:latest This will populate the missing blobs in the registry and allow the envbuilder build to succeed. |
envbuilder image: v1.0.3
I'm using Envbuilder and just saw this error when attempting to push an image with this template. This is the first time I tried it. Any ideas?
The text was updated successfully, but these errors were encountered: