Repository navigation
Version + "Update available" under the sidebar - #208
Merged
Merged
Conversation
The footer shows the version and the running commit (the image carries CURATARR_BUILD_SHA from the docker workflow; a checkout reads HEAD from .git). For admins, services/update_check asks GitHub anonymously every 6 h whether a newer build is published: the last successful docker run on main for a container, the newest main commit for a checkout. Only a published commit ahead of ours counts (compare status ahead/diverged), so a dev branch is never told to update. GET /api/system/version answers from the stored result and kicks the refresh in the background. deploy/docker-compose.yml offers pull_policy: always as an option (commented out): with it, TrueNAS's edit + save pulls :latest. UPDATE_CHECK=false turns the check off. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
v1.1.0-beta · abc1234, full SHA and build date in the tooltip).GET /api/system/version: every signed-in user gets the build. Admins also get the update status. The answer comes fromapp_state, and a stale one (6 h, 1 h after an error) kicks one background refresh, so the request never waits on GitHub.How "newer" is decided (
services/update_check.py)docker.ymlpush run on main, i.e. what:latestis. Compared withCURATARR_BUILD_SHA, which the workflow now bakes into the image as a build arg (late in the Dockerfile, so the pip layer stays cached; OCI revision label too)..gitdirectly (worktrees and packed-refs handled), with no git binary.compare/{ours}...{latest}: onlyahead/divergedcount, so a dev branch running ahead of main is never told to update. An unknown build or a rate limit gives no answer, and the check retries after 1 h.UPDATE_CHECK=falseturns it off.Updating on TrueNAS
TrueNAS's own update badge is unreliable for custom YAML apps.
deploy/docker-compose.ymlcarriespull_policy: alwaysas an option (commented out): with it, Edit → Save pulls:latest. Without it:docker pulland then Edit → Save. Documented indocs/NAS_MOVE.md("Updating later").Tests
tests/test_update_check.py(30 checks): build detection (env, loose ref, packed-refs, detached HEAD, worktree), refresh against a fake GitHub (same / ahead / behind / diverged / unknown / rate limited / no sha), staleness, single background refresh, member vs admin endpoint, Dockerfile/workflow/compose/frontend wiring. Full battery 229/229 green.🤖 Generated with Claude Code