docker rm -f exits 0 for a container that does not exist. The "Removing retired services" step therefore printed removed container netork-registry-1 on every deploy of every host, long after the container was gone. On 2026-10-08 two deploys to 172.22.8.50 in a row both reported it, while docker events showed no create or remove of that container in between.
Change:docker inspect first, so only an existing container is removed and reported. The volume loop is unchanged, because docker volume rm already fails for a missing volume. The README notes that the step reports only what it removed.
Tests:test_deploy_retired_services.py now runs the command the deploy sends against a fake docker whose rm -f succeeds for anything, like the real one:
no report when the container is absent;
a report when it exists.
All 28 tests pass and ruff is clean. On .50 the new loop prints nothing, as it should.
Closes #7.
`docker rm -f` exits 0 for a container that does not exist. The "Removing retired services" step therefore printed `removed container netork-registry-1` on every deploy of every host, long after the container was gone. On 2026-10-08 two deploys to 172.22.8.50 in a row both reported it, while `docker events` showed no create or remove of that container in between.
**Change:** `docker inspect` first, so only an existing container is removed and reported. The volume loop is unchanged, because `docker volume rm` already fails for a missing volume. The README notes that the step reports only what it removed.
**Tests:** `test_deploy_retired_services.py` now runs the command the deploy sends against a fake `docker` whose `rm -f` succeeds for anything, like the real one:
- no report when the container is absent;
- a report when it exists.
All 28 tests pass and ruff is clean. On .50 the new loop prints nothing, as it should.
`docker rm -f` exits 0 for a container that does not exist, so the
"Removing retired services" step printed "removed container
netork-registry-1" on every deploy of every host, long after the
container was gone. That read as something recreating the registry
each time, and it would hide the one deploy that really removed it.
Check with `docker inspect` first, so only an existing container is
removed and reported. The volume branch needed nothing: `docker volume
rm` already fails for a missing volume.
Closes#7
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Closes #7.
docker rm -fexits 0 for a container that does not exist. The "Removing retired services" step therefore printedremoved container netork-registry-1on every deploy of every host, long after the container was gone. On 2026-10-08 two deploys to 172.22.8.50 in a row both reported it, whiledocker eventsshowed no create or remove of that container in between.Change:
docker inspectfirst, so only an existing container is removed and reported. The volume loop is unchanged, becausedocker volume rmalready fails for a missing volume. The README notes that the step reports only what it removed.Tests:
test_deploy_retired_services.pynow runs the command the deploy sends against a fakedockerwhoserm -fsucceeds for anything, like the real one:All 28 tests pass and ruff is clean. On .50 the new loop prints nothing, as it should.