oras-project / oras

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

fix!: downgrade the global verbose flag #1553

Closed Wwwsylvia closed 2 days ago

Wwwsylvia commented 5 days ago

What this PR does / why we need it:

  1. [BREAKING CHANGE] Remove the global verbose flag out of opts.Common
  2. Add local verbose flags to the following commands:
  1. Remove the verbose option for the logger

[!NOTE]

1533 will be addressed in steps:

  1. Downgrade the global level verbose flag to command-specific level
  2. Mark the command-specific level verbose flag as deprecated

The deprecation of the verbose flag will come in a future PR.

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 part of #1533

Please check the following list:

codecov[bot] commented 5 days ago

Codecov Report

Attention: Patch coverage is 92.85714% with 3 lines in your changes missing coverage. Please review.

Project coverage is 83.98%. Comparing base (0483d7b) to head (bedfd51). Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
cmd/oras/root/manifest/push.go 57.14% 1 Missing and 2 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1553 +/- ## ========================================== - Coverage 83.99% 83.98% -0.02% ========================================== Files 119 119 Lines 5306 5314 +8 ========================================== + Hits 4457 4463 +6 - Misses 602 604 +2 Partials 247 247 ```

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

Wwwsylvia commented 5 days ago

There are 17 commands that support verbose and this PR reduces that to 10 which is technically a breaking change, right?

Indeed, it is technically a breaking change. But the idea is that the verbose flag makes no difference on the output of the rest of 10 commands, so the existence of the flag is more like a bug instead of a feature for those commands. This change aims to fix the bug.