Open sopos opened 2 years ago
Isn't this expected behaviour, as you set verbosity for individual steps.
e.g. $ tmt run execute -vvv report -v
@sopos, according to #509 and PR https://github.com/teemtee/tmt/pull/616, looks tmt run execute -vvvddd
and tmt run -vvvddd execute
should behave differently as expected, can we close this issue?
I do not agree with closing. The verbosity should be still propagated from the global to local.
My understanding is that the global setting should be inherited unless a local is specified.
There is one little catch: how to disregard the verbosity for one step? Implementing -s|--silent
might be a solution.
The same applies to the debug.
Hi @sopos,
tmt run execute -vvvddd
, -vvvddd
is local?tmt run -vvvddd execute
, -vvvddd
is global?
And tmt -dddvvv run execute
, -vvvddd
is also global, right?I would say so. That's my take when @psss explained it to me some time ago - the sub-commands should inherit these options in a cascade.
That's my take when @psss explained it to me some time ago - the sub-commands should inherit these options in a cascade.
Hi @psss, would you help to explain what the differences among tmt run execute -vvvddd
, tmt run -vvvddd execute
and tmt -dddvvv run execute
?
From my understanding, tmt -dddvvv run execute
means -dddvvv
is global as:
$ tmt --help
Usage: tmt [OPTIONS] COMMAND [ARGS]...
but I don't understand the expected behaviours of both tmt run -vvvddd execute
and tmt run execute -vvvddd
, would you please help to clarify about sub-commands should inherit these options in a cascade? thanks!
@idorax It means that subcommand should user verbosity/debug level from main command unless it is specified explicitly.
command | tmt | run | discover | execute |
---|---|---|---|---|
tmt -vvvddd run discover execute | v=3 d=3 | v=3 d=3 | v=3 d=3 | v=3 d=3 |
tmt run -vvvddd discover execute | v=0 d=0 | v=3 d=3 | v=3 d=3 | v=3 d=3 |
tmt run discover -vvvddd execute | v=0 d=0 | v=0 d=0 | v=3 d=3 | v=0 d=0 |
tmt -v run -dd discover -vvd execute | v=1 d=0 | v=1 d=2 | v=2 d=1 | v=1 d=2 |
So for 'execute' step all three tmt run execute -vvvddd
, tmt run -vvvddd execute
and tmt -dddvvv run execute
has same verbosity/debug values. What would differ are other steps (if they were run)
The reported issue shows that even though execute -vvvddd
was used, output is less verbose than it should be.
Very helpful table! What is the expected outcome of the following, decreasing verbosity? tmt -vvvddd run -vvdd discover -vd execute
not really, execute
should inherit from run
, i.e. it would effectively be run -vvdd
What is the expected outcome of the following, decreasing verbosity?
tmt -vvvddd run -vvdd discover -vd execute
As @sopos wrote: "steps" are siblings (not parent-child) so verbosity of discover doesn't affect execute thus the verbosity of the execute step should be inherited from it's parent which is run.
We are missing 'silent' or decrease verbosity level. Or is there a way from tmt -v run -dd execute
to run execute with v=0 d=1?
I'm afraid there's no such a way. Therefore I suggested to implement -s|--silent
to be able to achieve that. But The priority is really low as one usually wants to debug more rather than less.