Skip to content

fix: infer manifest mediaType from Content-Type when omitted - #158

Open
dnygate wants to merge 2 commits into
cloudflare:mainfrom
dnygate:fix/manifest-mediatype-from-content-type
Open

dnygate wants to merge 2 commits into
cloudflare:mainfrom
dnygate:fix/manifest-mediatype-from-content-type

Conversation

@dnygate

@dnygate dnygate commented Sep 15, 2026

Copy link
Copy Markdown

helm push fails with 400 manifest invalid: Invalid input.

Helm omits the top-level mediaType, which is OPTIONAL in the OCI image-spec, but manifestSchema requires it.

Fixed by filling in mediaType from the Content-Type header when the body omits it — substituted into the parsed manifest only, so stored bytes still hash to the pushed digest.

Second commit is independent: union validation failures reported a bare Invalid input with no field name, now they name the field.

Verified with Helm 4.3.0 against wrangler dev and a deployed worker: helm push/helm pull round-trips byte-identical, docker push/pull unaffected. Tests added.

The top-level mediaType is OPTIONAL in the OCI image-spec and Helm omits it,
but manifestSchema required it, so `helm push` failed with a 400.

Inferred into the parsed manifest only; stored bytes are untouched so they
still hash to the pushed digest.
Union failures reported a bare "Invalid input" with no path.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant