-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Skip to login in finish step if '-t' is specfied #1933
base: main
Are you sure you want to change the base?
Conversation
317b569
to
d861f61
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately this breaks --step
and --when
functionality:
Same reproducer.fmf with tmt run login -t --step prepare
- As a user I might want to login to the system before the execute step.
The --when
breakage is questionable, however the main difference between --test
and --when
is login to 'execute' versus 'finish' step, which have different environment.
With that said I think there might be some valid use case to user -t
and --when
together.
@lukaszachy, how about introducing a variable to record the action to log into the guest is done? If it's done, skip to the login action in finish step. |
IMO it is not necessary. Your approach is good, just stop the login in finish only if there isn't From the options |
@lukaszachy, to check $ find tmt -name "*.py" | xargs egrep -- "'--when|'--step"
tmt/steps/__init__.py: '-s', '--step', metavar='STEP[:PHASE]', multiple=True,
tmt/steps/__init__.py: '-s', '--step', metavar='STEP[:PHASE]', multiple=True,
tmt/steps/__init__.py: '-w', '--when', metavar='RESULT', multiple=True, Would you please help to paste a user case having |
How about the opposite question - Why should we disallow that? I've realized that '-c CMD' can be used to workaround fact one cannot append 'prepare' or 'finish' step from the commandline (it would replace step definition from the plan) to do something on the guest. |
While trying to create use case for Current implementation is that IMO we could keep This would cover use case when User has several tests in the plan but want to login immediately after RESULT (usually fail or error) to investigate what has happened. Currently it is not easy as |
/packit test |
Yeah, for me it makes sense to be able to combine these parameters to be able to login to a server after each failed or error test. +1 for me |
This is the usual 'issue looks easy at first but later it explodes' example. Conclusion from the hacking session: We allow multiple I'm not sure that mutiple This should ready for the future once multiple subcommands can be used properly (the logic of login command can stay the same). |
To finally reply the use cases:
|
If option `--test` (`-t`) is specified, we should skip to log into the guest in finish step as the action to login has been done already. Signed-off-by: Vector Li <[email protected]>
d861f61
to
bbbf110
Compare
Signed-off-by: Vector Li <[email protected]>
My testing plan:
The But Could the login in 'finish' be disabled when '-t --when' is set but '--step finish' is not? |
What do you think about extending the login test set with these cases? |
If option
--test
(-t
) is specified, we should skip to log into the guest in finish phase as it has been done already.Fix: #1918