Handle release upgrade (v2)
Follow-up to #766 (closed), after the core team discussed in a meeting how to systematically approach this. What we came up with:
Initial CI version:
-
Write an upgrade test script: - download the latest stable image
- replace repositories in /etc/apk/repositories to edge
- try to upgrade with
apk upgrade -a
(will exit with error if there are problems)
-
Fix things up, so the script passes - if needed, add fixup code to that upgrade test script for now. -
Make the test script run on a defined interval (daily?) in CI - similar to monitoring
- add a badge to pmaports too (like upstream compatibility) so we can see when it fails
Extended CI:
-
verify with qemu that it boots after the upgrade: - generate qemu-amd64 stable image (currently v21.12)
- try to boot it with
pmbootstrap qemu
- perform the upgrade
- reboot
- verify that it still boots
Integration:
-
turn the upgrade test script into a nice command-line tool - again, the script does: adjust /etc/apk/repositories, fixups, run
apk upgrade -a
- this would be used by e.g. Sxmo users
- gnome-software and kde discover would call this command-line tool
- make it lightweight - could be a shell script too, we'll figure out what makes sense during initial CI phase above
- again, the script does: adjust /etc/apk/repositories, fixups, run
-
integrate into gnome-software -
integrate into kde discover
Roll out:
-
after this has been properly tested and is known to be working, make it available in the following release.
Bonus:
-
I wonder how much effort it would be to make this work for previous releases too - v20.05, v21.03, v21.06. If it's not much effort, it might be nice to backport the cli tool and make it available there as well?
I'll tag this as help wanted - if somebody wants to give it a try, let us know here. Start with the upgrade test script mentioned in the beginning and make it pass.
In the meeting we discussed to run the CI job weekly. After reading through this again, daily seems to be a more useful interval, it helps pinning down when something broke and seeing faster when it's fixed again.
Edited by Administrator