Repository navigation
fix(updater): keep a container when the post-pull comparison fails - #33
Merged
kmendell merged 1 commit intoNov 26, 2026
Merged
Conversation
UpdateContainer recreated the container when it could not compare the pulled image with the container's image, unless the update changed the tag. A transient inspect failure therefore restarted a container that may already run the current image, and reported it as updated. A failed comparison now fails the container with the comparison error and leaves it running; only a forced digest update still recreates it. Fixes getarcaneapp#32 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
🔍 Code ReviewPR #33 · Low and informational (2)
🤖 Claude Opus 5.5 (High) · T3 Code (Claude Code) · Round 1 of 3 |
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.
UpdateContainerrecreated a container when it could not tell whether the pulled image differs from the one the container runs. After the pull, a failed comparison (for example a failedImageInspectof the pulled reference) only stopped the update for tag changes. For a digest update it fell through to the recreate, so a transient inspect failure restarted a container that may already run the current image, and reported it asupdated.Arcane reaches this from its single-container update, which the UI's container update and the container
updatewebhook use. A webhook that fires after every CI run could therefore restart a container whose image did not change.Changes
updater/container.go: a failed post-pull comparison now reports the container as failed with the comparison error and leaves it running, the same way a failed pull does. A forced digest update (Options.Force) still recreates without a comparison, since it does so even when the digest is unchanged. Tag changes keep failing on a comparison error, as before.pullTargetPlans(updater/targeted.go, which fails on an inspect error even when forced) and inapplyUpdatePlanwithRestartContainersUsingOldImages(updater/apply.go,updater/restart.go, which restart image-wide pending records when the image-ID lookup fails). Both differences predate this PR and only show when an inspect fails right after a successful pull; the code doesn't show which behavior is right, so unifying them needs that decision first. The review comment below lists both.Checks
Run in
golang:1.27.4andgolangci/golangci-lint:v2.15.0containers, for theupdatermodule:go vet ./...andgo test -race ./...pass.golangci-lint fmt --diff(no diff) andgolangci-lint run(0 issues).TestUpdateContainerTagSelectiontable,failed digest comparison leaves container running: every image inspect fails, and the case expects one failed result, one pull, and no Docker mutations. Onmainit fails because the container is recreated and reported asupdated. With this change it passes.Arcane picks this up at its next
kit.getarcane.app/updaterbump.Closes #32
🤖 Generated with Claude Code