Repository navigation
fix(cli): devops docker prune removes stopped containers, unused networks and dangling images instead of failing on every engine - #2190
Merged
Conversation
…orks and dangling images instead of failing on every engine Call containers.prune(), networks.prune(), and images.prune() on the docker-py client instead of client.system.prune. Call volumes.prune() when the volumes flag is set. Closes #1116
dan-petty
marked this pull request as ready for review
October 24, 2026 22:37
dan-petty
pushed a commit
that referenced
this pull request
Oct 24, 2026
🤖 I have created a release *beep* *boop* --- ## [0.4.2](v0.4.1...v0.4.2) (2026-10-24) ### Bug Fixes * **ai:** the default model, the bundle models, the benchmark default and the gpu matrix name models that the gateway serves ([#2188](#2188)) ([38f6afa](38f6afa)) * **cli:** devops docker prune removes stopped containers, unused networks and dangling images instead of failing on every engine ([#2190](#2190)) ([adc122b](adc122b)) * **github:** gh calls no longer stall silently behind a fixed 60-call window ([#1118](#1118)) ([#2189](#2189)) ([ba239fa](ba239fa)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.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.
Summary
devops docker prunefailed with anAttributeErroron docker-py 7.2.0 becauseDockerClienthas nosystemattribute.This pull request adds
DockerEngineService.prune(self, *, volumes: bool = False) -> intto prune containers, networks, images, and conditionally volumes in sequential order. It calculates the total reclaimed space and invalidates the cached disk usage summary.devops docker prunenow uses the engine service method, removes legacy tuple return handling, improves confirmation and help messages, and exits 1 without a stack trace on daemon errors.Autospecced
docker_clientfixture intests/conftest.pyprevents future attribute assumptions on the client and its collections.Closes #1116
Verification
uv run devops ci fail-to-pass --base origin/mainFail-to-pass: 12 failed on base (12 failed and 114 passed in tests/test_docker.py, tests/test_docker_engine.py; 0 errored).
uv run devops cipassed all 19 gates.uv run devops docs checkpassed.uv run devops openspec checkpassed.