v2.12.1 β "Update Now" actually requests an update - #52
Merged
Conversation
POST /api/admin/update wrote the literal string "requested at <timestamp>". The updater added in 2.12.0 reads target_version out of that file as JSON and refuses anything that is not semver β correctly, since the tag originates from the GitHub API and ends up in `docker pull`. The button therefore parsed to an empty target and was refused every single time: "Update Now" silently did nothing. Verified both directions: the new JSON payload parses to target_version=2.12.0 and passes the semver guard; the old string parses to '' and is refused. The endpoint now resolves the latest release from GitHub itself rather than trusting a caller-supplied tag, returns up_to_date instead of queueing a no-op when already current, and accepts force=true to re-apply the current version and recover a half-applied update. GET /admin/update-result exposes the outcome β including rollbacks β so the UI can say what happened. Also: deploy-to-nas.sh extracted a tar, which adds and overwrites but never deletes, so files removed upstream lingered on the remote forever (the dead services deleted in 2.11.0 were still on the NAS today, found by diffing the deployment against main). It now prunes tracked-but-absent files first so a deploy mirrors the repo, protecting host-local files by name. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HmUiLHPmKoz215WAWV5eHe
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.
The bug
POST /api/admin/updatewrote the literal stringrequested at <timestamp>into the signal file.The updater added in 2.12.0 reads
target_versionout of that file as JSON and refuses anything that isn't semver β correctly, since the tag originates from the GitHub API and ends up indocker pull. So the button parsed to an empty target and was refused every time. "Update Now" silently did nothing.Verified both directions:
target_version2.12.0''The fix
The endpoint now resolves the latest release from GitHub itself rather than trusting a caller-supplied tag, so a request can't point the updater at an arbitrary image. It returns
up_to_dateinstead of queueing a no-op when you're already current, and takes?force=trueto re-apply the current version and recover a half-applied update.New
GET /api/admin/update-resultexposes the outcome of the last attempt, including rollbacks, so the UI can report what happened instead of being a button that reports nothing back.Also: deploy wasn't a mirror
scripts/deploy-to-nas.shextracts a tar, which adds and overwrites but never deletes. Files removed upstream lingered on the remote indefinitely β found by diffing a live deployment againstmain: the three dead services deleted in 2.11.0 were still there.It now prunes tracked-but-absent files before extracting, so a deploy mirrors the repo. Host-local files (
.env,docker-compose.override.yml, logs) are protected by name, and only paths git knows about are considered.Minor
_read_version()replaces three inlined copies of the same VERSION read inroutes/admin.py, one of which had drifted.17 tests pass.
π€ Generated with Claude Code
https://claude.ai/code/session_01HmUiLHPmKoz215WAWV5eHe