oras-project / oras

OCI registry client - managing content like artifacts, images, packages
https://oras.land
Apache License 2.0
1.33k stars 161 forks source link

fix: oras push should return error when artifacttype is empty for spec 1.1 #1317

Closed wangxiaoxuan273 closed 2 months ago

wangxiaoxuan273 commented 3 months ago

What this PR does / why we need it: oras push should return an error when --config is used, --artifact-type is not used and --image-spec is set to v1.1.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged): Fixes #1313

Please check the following list:

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 84.10%. Comparing base (122f01b) to head (15e944c).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1317 +/- ## ========================================== + Coverage 84.06% 84.10% +0.04% ========================================== Files 90 90 Lines 3458 3467 +9 ========================================== + Hits 2907 2916 +9 Misses 329 329 Partials 222 222 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

wangxiaoxuan273 commented 3 months ago

There are 3 issues to discuss:

  1. Do we allow users to input --image-spec auto? (currently yes)

  2. What should be the output of oras push -h for --image-spec? (current display below)

    Screenshot 2024-04-02 at 15 08 57
  3. We need to document the behavior of auto. (default to v1.1, unless --config is used and --artifact-type is not given)