[Fix] Upgrade retries reject backups after a failed image pull - #1009
Merged
Conversation
Contributor
Author
roomote-community
Bot
requested review from
brunobergher,
daniel-lxs and
mrubens
as code owners
August 3, 2026 16:47
Contributor
Pull request overviewThis PR improves the host upgrade path ( Changes:
Reviewed changesCopilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
|
Contributor
|
@tebieshi good to go? |
mrubens
approved these changes
Aug 3, 2026
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.
What changed
Failed
roomote upgradeattempts now restore the deployment.env, Compose file, and Caddyfile from the pre-upgrade staging copy before exiting. If the rollout had already stopped the controller, the failure cleanup starts it again.A focused host CLI regression test simulates a missing worker image and verifies that the prior release metadata is preserved, the controller is restarted, and temporary staging files are removed. CI now runs this test and includes it in deployment script syntax validation.
Why this change was made
Upgrade metadata was written before image pulls completed, but only migration failures restored it. A missing image could therefore leave an undeployed tag recorded as current, causing the next pre-upgrade backup to fail while inspecting an image that had never been deployed.
Impact
Operators can retry
roomote upgradenormally after an image pull failure without using--skip-backup; backups continue to describe the release that is actually deployed. The focused regression test and pre-push lint, type, and dependency checks passed. Full deployment artifact validation could not complete locally because the sandbox has no Docker socket for Caddy adaptation.