qvm-template-upgrade: add CLI skeleton and orchestration flow#213
Draft
nihalxkumar wants to merge 3 commits into
Draft
qvm-template-upgrade: add CLI skeleton and orchestration flow#213nihalxkumar wants to merge 3 commits into
nihalxkumar wants to merge 3 commits into
Conversation
ben-grande
suggested changes
May 25, 2026
Contributor
ben-grande
left a comment
There was a problem hiding this comment.
Yay, started. As I've done a review now, I will receive a notification every time you commit. Let me know when you need another look or have doubts by mentioning me.
| datetime.now(tz=timezone.utc).strftime(DATE_FMT) | ||
|
|
||
|
|
||
| def remove_failed_clone(clone_vm, log): |
Contributor
There was a problem hiding this comment.
You might want to include some functions as a method of a class, to avoid passing objects explicitly.
ben-grande
reviewed
May 27, 2026
| return log | ||
|
|
||
|
|
||
| def validate_template(app, name): |
Contributor
There was a problem hiding this comment.
Adapt the function name also to the new klass it encompasses.
Move validation, cloning, agent execution, finalization, and rollback into a stateful TemplateUpgrader. Refresh TemplateVM metadata after success and rewrite existing StandaloneVM template-name values from the old release to the new one so updater EOL checks do not use stale metadata. Also make logging setup best-effort and idempotent. Update tests for the class-based flow and standalone metadata handling.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #213 +/- ##
==========================================
+ Coverage 72.63% 74.89% +2.25%
==========================================
Files 10 14 +4
Lines 1162 1597 +435
==========================================
+ Hits 844 1196 +352
- Misses 318 401 +83 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a PR for the GSoC 2026 project: Automate Template Version Upgrade
introducing the
qvm-template-upgradedom0 command-line utility, which provides the orchestration layer for in-place template version upgrades.TLDR of what this PR does at the moment:
--keep-on-failureis passed), leaving the original template untouched.related to QubesOS/qubes-issues#8605.