#2084 list-signed has separate --debug option
Closed: Fixed 3 years ago by tkopecek. Opened 4 years ago 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

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

4 years ago

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?)

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

3 years ago

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

3 years ago

Login to comment on this ticket.

Metadata
Related Pull Requests
  • #2085 Merged 3 years ago