#633 unify runroot CLI interface
Merged by mikem. Opened by tkopecek.
tkopecek/koji issue564  into  master

Download 633.patch

Related: https://pagure.io/koji/issue/564

Treat runroot task similarly to other build commands.

1 new commit added

  • fix unit test

The thing is, runroot is not quite like other build commands.

The command is designed to act more like running a command via ssh. That is, you issue the command and then you (eventually) get the output on stdout. This PR changes that behavior, which I'm fairly sure some tools rely upon.

I'm fine with adding a --nowait option as #564 asks. I'm even fine with adding a --watch option (or whatever name) that would give this new behavior. However the existing behavior needs to be preserved by default.

rebased onto 283d5de01932d23176783f8825bf3609220dc13c

Updated to be backwards compatible. Added some more tests.

the wait option needs default=True, otherwise we change the default behavior

1 new commit added

  • correct default for --wait

rebased onto 8ce80831f92cfa8f3937abb312790bea158d69f8

parser.error should always raise an error. There are a few places in the code that we put assert False # pragma: no cover afterwards out of paranoia, but a return is not right.

I assume this is here because of behavior in a unit test where the parser is mocked. We should fix the unit test instead of adding a return here.

$ git diff master...|flake8 --diff
./plugins/cli/runroot.py:6:1: F401 'koji_cli.lib._running_in_bg' imported but unused

the unit test is doing a number of questionable things actually...

I have some unit test cleanup here
https://github.com/mikem23/koji-playground/commits/pagure/pr/633

rebased onto 6c9b942b6f73e4253141e9ff3987b2f522f97ce9

Commit dec0c7b7 fixes this pull-request

Pull-Request has been merged by mikem@redhat.com

Metadata