#2084 list-signed has separate --debug option
Closed: Fixed by tkopecek. Opened by tkopecek.

while global one should be used here. It created confusing situations with different behaviour for

koji list-signed --debug
# vs
koji --debug list-signed

PR #2085

Metadata Update from @tkopecek:
- Custom field Size adjusted to None

I see that this is confusing, but I'm not sure that a simple change is the right thing here.

As you say, the --debug option for the command only shows debug output relative to the command itself, while the --debug option for the whole script. Maybe there is little value in the difference, but it may matter and we should think about that before we change it.

We should also avoid causing formerly valid commands to become invalid.

There are other examples of commands with their own --debug similar options:

  • print-signed-copies
  • list-tag-history
  • list-history

If we're going to make a change about this, we should do so consistently. I would suggest:

  • make the options hidden
  • make the options default to the main value (like --quiet does for the build command)
  • add comments referencing this issue

Doing much more pushes at the limitations of the way the cli is structured and kind of points at a larger refactor (e.g. the fact that there is even a difference between main options and command options).

Note: maven-build and maven-chain also take --debug and pass it as a build parameter. That's not the same situation. I think we should keep them that way, but perhaps those cases are also confusing.

I've updated the PR. In many places there is also --verbose options. Would it make sense to do the same there (and use not goptions.quiet for default of it?)

Commit 9e196264 fixes this issue

Commit 5b94c9eb fixes this issue

Metadata Update from @jcupova:
- Issue tagged with: testing-ready

Metadata Update from @jcupova:
- Issue tagged with: testing-done

This issue has been migrated to Fedora Forge:
https://forge.fedoraproject.org/koji/koji/issues/2084

Please continue any further discussion there.

Metadata
Related Pull Requests