-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
remote cache manifest to support oci mediatypes for spec compatibility #1550
Comments
Platform is not a required property https://github.com/opencontainers/image-spec/blob/master/image-index.md#image-index-property-descriptions
|
I've passed that information on the Ivan at Quay.io support and received the following response, which you may be able to shed some light on @tonistiigi ? Hi Craig, The 2nd sentence of that link sounds like it indeed should be there in some cases. I changed the output for caching to a local directory and managed to get the manifest, the error could be a red herring because of the content of the manifests:
This one looks fine. However, the SHA it references is this:
It could be a problem in the last media type for the last digest. Content types for Docker v2 schema 2 in Quay are defined here: OCI content types are defined here: It could be that this is why Quay refuses to validate the manifest. I can open an internal bug tracker for this issue to see what our engineers will say. Unfortunately, for bugs and RFEs I can't give you any ETA as to when the issue will be fixed. |
@tonistiigi Engineer of Quay here
Further, even if we did allow it to be optional, it appears BuiltKit is adding a layer of type |
If you want we could add the |
If I understand the problem correctly, it seems the problem is that Quay doesn't support the OCI format at current, which is why the manifest upload is failing.
Would this setting solve anything given the above issue? What would setting is to |
@Craga89 Well, and the media type of the produced list is Edit: Oh, and even if this was an OCI index, there is (as of yet) no defined means for storing custom layer types in OCI indexes, as the artifacts spec does not yet support it; the expected design would be to store the cache as a manifest with a custom schema type in OCI, not as an index/list. |
It would just replace "docker" string in the mediatype values to "oci". No changes to the actual objects. We don't set it by default so that more registries that don't know about oci would be supported. This would allow us to be compatible with the spec(by switching the spec document). Looks like the spec docs from 2016 do not explicitly mark the platform field as optional although all the implementations of |
@tonistiigi Given that the OCI artifacts spec is expressly designed to address these kinds of custom pushed resources, I'd suggest we circle back on whether this should be using an Index vs a Manifest, as Quay will likely be following the specification and only allow artifacts as manifests until such time as the spec is extended. |
I've noticed the same problem when pushing caches to Azure Container Registry--it throws a It happens intermittently, but often enough that we've had to switch to an alternate cache export for the time being due to the volume of "failed" builds due exclusively to the cache export. I don't have Azure-side logs to provide more diagnostic information yet, though. |
If it happens intermittently it probably is not related to the mediatypes issue here. @cpuguy83 have you seen something like this in ACR? |
Yep, let me bring this up with the ACR team again. |
Worth tracking that Amazon ECR has a similar concern as that raised by @josephschorr:
|
I'm currently use the Quay registry, and attempting to utilise the
--export-cache
feature i.e.--export-cache type=registry,ref=quay.io/hivehr/app,push=true
. However, I'm getting the following error consistently:After contacting Quay's support team, they've looked into this and determined that BuildKit's
--export-cache
seems to be creating a malformed schema v2 manifest list. This is the exact error:Quay checks the validity of the manifest pushed before it takes it into consideration, and it's failing to parse the manifest output by BuildKit in this instance.
To rule out it being a Quay-specific issue, I've also tried multiple times to push to Docker Hub with the following command:
There appears to be no errors, but the image is not available in the web UI and if I try to get the manifest of the image with Docker CLI, I get a 500 error. The image also cannot be pulled from Docker Hub either.
Can you give any guidance as to what the cause might be here? Apologies if this issue is already logged. I attempted to find a similar issue but none appeared to be quite the same.
The text was updated successfully, but these errors were encountered: