-
Notifications
You must be signed in to change notification settings - Fork 180
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
pushing the same blob twice with a different name fails #147
Comments
Thanks for posting Yuval, |
I need to refresh my memory, but I don't think so. I think it happened when only a new manifest is needed to be pushed. the code flow where it is pushed doesn't retry in case of |
I just ran into this same issue myself. |
I am using GitHub Packages Docker Registry https://ghcr.io |
Since that failure, I have pushed many tags that re-use blobs (layers), and haven't encountered an error. |
@jdolitsky i provided a reproduction script that works with docker registry. see my original description |
My failure re-used blobs (layers), but not the actual manifest itself. Perhaps reusing the manifest is the issue. |
This should be auto resolved once we move to oras-go v2. Let's validate it after the oras-go v2 migration. |
Pushing the same blob, with different names to a repo that requires authorization only for pushing fails.
The reason is, that since the blob exists, only the manifest needs to be pushed.
The manifest is pushed in a flow that doesn't allow for retries. The request fails as 401, because it is the first request that needs auth, and not retried.
I wasn't sure what's the best approch to fix this in ORAS, will be happy to contribute a PR once we agree on a solution.
The error message received:
Workaround:
Manually calling the root of the api and adding it to the authorizer before pusing. we implemented it here:
https://github.com/solo-io/wasme/blob/839c7818e16d715d4139393179004899a9d619c3/pkg/push/push.go#L114
to reproduce:
silly.yaml:
For extra context, stack trace of the failing request (just before it is sent):
The text was updated successfully, but these errors were encountered: