Closed qweeah closed 1 month ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 83.87%. Comparing base (
9a83394
) to head (7ac6dad
). Report is 1 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
What this PR does / why we need it:
When selecting a platform, oras-go only allows config type to be
application/vnd.oci.image.config.v1+json
. See https://github.com/oras-project/oras-go/blob/v2.5.0/internal/platform/platform.go#L110.This PR enforces above design with 2 changes: 1)
config.mediaType
is set toapplication/vnd.oci.image.config.v1+json
when baking platform into the config blob; 2) The usage oforas push --artifact-type xxx -artifact-platform xxx --image-spec v1.0 ...
is banned.Without this PR,
oras push
might generate artifacts that cannot be consumed byoras pull --platform
, see https://github.com/oras-project/oras/issues/1517#issuecomment-2443360381Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged): Fixes #1517Please check the following list: