[ECR] [request]: Accept zero-byte blobs (empty manifest config) so pull through cache can store OCI artifacts like conda-forge
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
Tell us about your request
Accept zero-byte blobs in ECR, both on push and when a pull through cache imports them from upstream.
The common case is a manifest config of size: 0 with digest
sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855, which oras-py (and older
ORAS tooling) writes by default.
Which service(s) is this request for? ECR
Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard?
We front ghcr.io/channel-mirrors/conda-forge (the conda-forge channel mirrored as OCI artifacts,
consumed natively by pixi/rattler) with an ECR pull through cache rule. Every package manifest there has
a zero-byte application/vnd.unknown.config.v1+json config. ECR can't store that blob:
- Pushing it directly fails:
blob upload invalid: The upload with id '…' … cannot be completed because it does not have any parts. - Through the pull through cache, the manifest is proxied and the layers are served, but the image is
never stored:
describe-imagesstays empty for every conda repository while Docker images and other OCI artifacts (Trivy DB, Helm charts) under the same rule persist normally.oras cpfrom the cache copies the layers and then gets "not found" for the config digest.
So the cache behaves as a pass-through: every client download goes upstream on the rule's credentials,
and the "if Amazon ECR is unable to update the image from the upstream registry … the last cached image
will still be pulled" protection never applies. A transient upstream authentication failure
(UnableToGetUpstreamLayerException) fails the client request outright.
Zero-byte blobs are valid in the OCI distribution spec, and #1074 (2020) said "in the fullness of time
we plan to support /dev/null as well". We've asked conda-oci-mirror to switch to the OCI 1.1 empty
descriptor (channel-mirrors/conda-oci-mirror#69), but that only helps newly pushed packages unless the
whole catalogue is re-pushed. The ECR fix would cover every existing artifact.
Are you currently working around this issue? No good workaround on ECR. We're moving conda to a self-hosted read-through proxy (Nexus) instead, though we'd rather stay on the managed cache.
Additional context Related: #1074 (same zero-byte config failure, ORAS), #2306 (loosen accepted media types).