Skip to content

fix(cli): deploy-app --image rolls the image again (BUGS.md §35), plus the day's bug records - #339

Merged
vsilent merged 4 commits into
devfrom
fix/deploy-app-image-override
Nov 13, 2026
Merged

vsilent merged 4 commits into
devfrom
fix/deploy-app-image-override

Conversation

@vsilent

@vsilent vsilent commented Nov 13, 2026

Copy link
Copy Markdown
Collaborator

Fix

stacker agent deploy-app <app> --image <ref> --force reported the new image as deployed while the container was recreated with the compose's own image. The agent deploys compose_content exactly as written and never reads the request's image field, so once the CLI started sending the generated compose (the §31 fix), the override silently no-opped for every template-based project.

The override now rewrites the target service's image: inside the compose the request carries - only that service. Works against agents already in the field.

Regression test with the n8n template's exact shape, written first and confirmed failing against the previous behaviour (the compose kept the old image). Full suite green.

Verified live on a running n8n stack: deploy-app n8n --image n8nio/n8n:2.47.7 --force rolled 2.45.4 -> 2.47.7 (container labels confirm), published ports intact, /, /healthz, /healthz/readiness all 200.

Bug records (BUGS.md)

  • §20 - fourth occurrence of a deploy ending paused [port_conflict] while the stack is up; the precheck listed the deploy's own container as the conflict.
  • §31 - live verification of the deploy-app port fix: ports survive --force recreation.
  • §35 - the bug fixed here: cause, evidence, verification.
  • §36 - the cargo clippy -- -D warnings / cargo fmt -- --check gates fail on pre-existing code (toolchain drift). Not fixed here - separate cleanup.

Follow-up (other repo)

The agent-side DeployAppCommand.image contract is still unimplemented (status/src/commands/stacker.rs), so direct agent exec deploy_app callers with image and no rewritten compose are still ignored. Tracked in §35.

…mpose_content

The agent deploys compose_content exactly as written and never reads the
request's image field, so the override silently did nothing while the
command record reported the new image next to status: deployed (BUGS.md
35). Rewrite the target service's image inside the compose the request
carries. Regression test with the n8n template's exact shape, written
first and confirmed failing against the previous behaviour.
@vsilent
vsilent merged commit c4d3f70 into dev Nov 13, 2026
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants