fix: restart dovecot after package replacement#904
fix: restart dovecot after package replacement#904Retengart wants to merge 10 commits intochatmail:mainfrom
Conversation
|
@missytake , Can you take a look at what's with /home/runner/.ssh/id_ed25519 and restart the deployment? |
j4n
left a comment
There was a problem hiding this comment.
Looks good mostly, thank you :)
|
Merged main into fix-dovecot to resolve the Dovecot deployer conflict. Kept both behaviors in install(): restart intent after package replacement and the new pin-dovecot apt preferences file. Added regression coverage for the pinning path and reran venv/bin/pytest cmdeploy/src/cmdeploy/tests/test_dovecot_deployer.py cmdeploy/src/cmdeploy/tests/test_cmdeploy.py cmdeploy/src/cmdeploy/tests/test_helpers.py cmdeploy/src/cmdeploy/tests/test_rshell.py --import-mode=importlib (19 passed). Ready for re-review. |
j4n
left a comment
There was a problem hiding this comment.
looks good, one minor remark still left from the original list.
| archive_version = dovecot_deployer.DOVECOT_ARCHIVE_VERSION.replace("+", "%2B") | ||
| assert deb == f"/root/dovecot-core_{archive_version}_amd64.deb" | ||
| assert changed is True | ||
| assert downloads == [ |
There was a problem hiding this comment.
This test is about the archive-vs-epoch version split. But name (pyinfra unit) and cache_time (calculated twice) are unrelatedand if any of those change, this test breaks with a misleading failure pointing at a version-separation test. Maybe:
assert len(downloads) == 1
assert archive_version in downloads[0]["src"]
assert archive_version in downloads[0]["dest"]
assert dovecot_deployer.DOVECOT_PACKAGE_VERSION not in downloads[0]["src"]
assert dovecot_deployer.DOVECOT_PACKAGE_VERSION not in deb
Summary
policy-rc.dblocks package-triggered restartsTest Plan
venv/bin/pytest cmdeploy/src/cmdeploy/tests/test_dovecot_deployer.py -vvenv/bin/pytest cmdeploy/src/cmdeploy/tests/test_cmdeploy.py cmdeploy/src/cmdeploy/tests/test_helpers.py cmdeploy/src/cmdeploy/tests/test_rshell.py -vvenv/bin/pytest cmdeploy/src/cmdeploy/tests/online/test_1_basic.py::test_dovecot_main_process_matches_installed_binary -vvenv/bin/pytest cmdeploy/src/cmdeploy/tests/online/test_0_login.py::test_login_basic_functioning -vruff check cmdeploy/src/cmdeploy/dovecot/deployer.py cmdeploy/src/cmdeploy/tests/test_dovecot_deployer.py