-
Notifications
You must be signed in to change notification settings - Fork 187
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
mismatch Content-Length
when copying recursively between Google Artifact Registry repositories
#1626
Comments
A bit of extra info: I can copy this signature artefact directly using the following process:
I can then run |
Hi @rorynickolls-skyral , this looks strange. I am not sure whether there is any file size limit on GAR. Have you tested copy this signed image with signature in other registries? |
This looks interesting. @rorynickolls-skyral Could you run the following commands and share the results? oras manifest fetch --descriptor $registry/$repoName@sha256:12fcff0daec29e1593647d6f88e3329d4c9f4054035eba331f8e3c13e3488c4d
oras discover $registry/$repoName@sha256:b3d61268ae447295d1619e2a6156ddf8635a65aff40cfd65588a1024af77121a --format json` |
Here are those commands:
I've also just tested by copying to a fresh zot registry running locally, and get the same error. Taking out the
|
@rorynickolls-skyral Thanks! oras discover $registry/$repoName@sha256:b3d61268ae447295d1619e2a6156ddf8635a65aff40cfd65588a1024af77121a --format json instead? It's |
Yep, this time I get this:
That size of 521 matches the "virtual size" in the UI screenshot above, if that's what you're looking for. |
Yeah this explains why. While performing recursive copy It looks like the Google Artifact Registry includes a "virtual" size in the results of referrers API? |
I had to build from source, here are the logs:
|
Thanks @rorynickolls-skyral for the information. The logs do show that the referrers are obtained from Google Artifact Registry's referrers API, and the size for
Here is a comparison between the descriptor for the manifest Descriptor for {
"mediaType": "application/vnd.oci.image.manifest.v1+json",
"digest": "sha256:12fcff0daec29e1593647d6f88e3329d4c9f4054035eba331f8e3c13e3488c4d",
"size": 739
} Descriptor for {
"mediaType": "application/vnd.oci.image.manifest.v1+json",
"digest": "sha256:12fcff0daec29e1593647d6f88e3329d4c9f4054035eba331f8e3c13e3488c4d",
"size": 521
} @rorynickolls-skyral You might want to seek support from Google Artifact Registry to understand this behavior🧐 |
What happened in your environment?
I'm trying to copy an image and all related artefacts (signature, attestations) from one Google Artifact Registry repository to another using oras.
It copies the image itself fine, but fails at copying the signature with the following error message:
When I look at debug logs, response headers indicate a content length of 739 bytes:
This matches up to the size of the file in the GAR UI:
However I do note the following, also in the GAR UI, which makes me think that oras may be receiving a compressed artefact and expecting a content length that matches the compressed size (521), not the actual size (739):
What did you expect to happen?
The image and related artefacts were copied to the other GAR repository like-for-like.
How can we reproduce it?
The command I am running is this:
The signed image is just the standard nginx image pushed up to a local Google Artifact Registry and signed using Cosign's OCI v1.1 support:
What is the version of your ORAS CLI?
What is your OS environment?
OSX 15.3.1
Are you willing to submit PRs to fix it?
The text was updated successfully, but these errors were encountered: