Simplification of updater CLI options#157
Conversation
fdb6d4c to
cd36a0e
Compare
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. Thanks for integrating Codecov - We've got you covered ☂️ |
| return max(ret_code_independent, ret_code_appvm, ret_code_restart) | ||
| ret_code = max(ret_code_independent, ret_code_appvm, ret_code_restart) | ||
| if ret_code == 0 and no_updates: | ||
| return 100 |
There was a problem hiding this comment.
This could use some documentation. I'll update integration tests as several of them failed on this one...
On a second thought, is it really a good idea to exit non-zero if everything is up to date already? I realize it may be useful information for some wrapping tools, so maybe have this behavior behind some option?
BTW, this applies both to the case where update was run and there was nothing to install, and to the case where update was skipped based on some flags (like no updates-available flag, and user didn't forced an update).
OpenQA test summaryComplete test suite and dependencies: https://openqa.qubes-os.org/tests/overview?distri=qubesos&version=4.3&build=2024062721-4.3&flavor=pull-requests Test run included the following:
New failures, excluding unstableCompared to: https://openqa.qubes-os.org/tests/overview?distri=qubesos&version=4.3&build=2024062115-4.3&flavor=update
Failed tests11 failures
Fixed failuresCompared to: https://openqa.qubes-os.org/tests/103633#dependencies 5 fixed
Unstable testsDetails
|
Refactoring CLI arguments to avoid unintuitive updater behavior along with suitable tests.
Now, the selection of VMs for updating is based on two phases: preselection and selection.
Preselection is based on the passed flags and selects VMs for further selection (e.g., all templates and some standalones). During selection, the VMs chosen for updating are those from preselection for which in case of flag:
--update-id-available: we know that updates are available;--update-if-stale, we know that updates are available or the VMs haven't been checked for updates in a long time;--force-update, all from the preselection.TODO: