-
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
Cache can't be exported to Quay.io #1440
Comments
I should add that the cache export works OK with the docker.io registry. |
When pushing the cache to quay.io, we get an `400 BAD REQUEST`. Disabling it for now. moby/buildkit#1440 could be related.
I have not done any real investigation here, but this sounds like quay does not support cache manifests. |
Issue is that inline cache does not support max mode, which is a requirement in my case. |
Speaking with someone else, they are having trouble pushing 2 tags... e.g. |
I've tried to push 2 tags at the same time with a cache type=local and it works. So the issue is not about quay not supporting pushing 2 tags at once. |
Coming back at this issue as using quay.io may be something we're interested in again. I tried with latest buildkit (0.8.2), and I still cannot export cache to quay. Both
and
lead to 400 BAD REQUEST
while
and
both lead to 415 UNSUPPORTED MEDIA TYPE
So it seems that the OCI mediatypes support did not fix this issue. Any idea? |
We can reproduce this internally, using BuildKit's debug logs print out the whole message from quay.io:
Unpacking the schema we get: {
"properties": {
"annotations": {
"additionalProperties": true,
"description": "The annotations, if any, on this descriptor",
"type": "object"
},
"digest": {
"description": "The content addressable digest of the manifest in the blob store",
"type": "string"
},
"mediaType": {
"description": "The MIME type of the referenced manifest",
"enum": [
"application/vnd.oci.image.manifest.v1+json",
"application/vnd.oci.image.index.v1+json"
],
"type": "string"
},
"platform": {
"description": "The platform object describes the platform which the image in the manifest runs on",
"properties": {
"architecture": {
"description": "Specifies the CPU architecture, for example amd64 or ppc64le.",
"type": "string"
},
"features": {
"description": "specifies an array of strings, each listing a required CPU feature (for example sse4 or aes).",
"items": {
"type": "string"
},
"type": "array"
},
"os": {
"description": "Specifies the operating system, for example linux or windows",
"type": "string"
},
"os.features": {
"description": "specifies an array of strings, each listing a required OS feature (for example on Windows win32k)",
"items": {
"type": "string"
},
"type": "array"
},
"os.version": {
"description": "Specifies the operating system version, for example 10.0.10586",
"type": "string"
},
"variant": {
"description": "Specifies a variant of the CPU, for example armv6l to specify a particular CPU variant of the ARM CPU",
"type": "string"
}
},
"required": [
"architecture",
"os"
],
"type": "object"
},
"size": {
"description": "The size in bytes of the object. This field exists so that a client will have an expected size for the content before validating. If the length of the retrieved content does not match the specified length, the content should not be trusted.",
"type": "number"
},
"urls": {
"description": "This OPTIONAL property specifies a list of URIs from which this object MAY be downloaded. Each entry MUST conform to RFC 3986. Entries SHOULD use the http and https schemes, as defined in RFC 7230.",
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"mediaType",
"size",
"digest",
"platform"
],
"type": "object"
} Which fails on {
"annotations": {
"buildkit/createdat": "2022-11-04T14:23:52.088237395Z",
"containerd.io/uncompressed": "sha256:e51020b79aa31ba0068429ef6d68b917b5d953ee4c8c0c860599a89a13292377"
},
"digest": "sha256:0a6daaf7fd60ecab61c0767d25a027d62a655f29209e0e6add18ea4131f9416f",
"mediaType": "application/vnd.oci.image.layer.v1.tar+gzip",
"size": 27903893
} Quay is treating the Alternatively, for a buildkit-side fix, we could also take the same approach we take for attestation manifests, and explicitly attach WDYT @crazy-max @tonistiigi? |
Similar to #1143
When exporting cache to quay.io, it fails with
error: failed to solve: rpc error: code = Unknown desc = error writing manifest blob: failed commit on ref "sha256:c2aba47e903ef19d459785c7e5750ef7da0f6f86657d9b40c329d5268dfe2185": unexpected status: 401 Unauthorized
The error is the same with both modes:
mode=max
ormode=min
When I do not
--export-cache
, images are pushed properly to quay.io so the credentials are correct.The text was updated successfully, but these errors were encountered: