feat: add support for images/prune API#1001
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1001 +/- ##
==========================================
+ Coverage 73.03% 73.12% +0.08%
==========================================
Files 25 25
Lines 1836 1842 +6
Branches 250 251 +1
==========================================
+ Hits 1341 1347 +6
Misses 410 410
Partials 85 85 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR adds support for the Docker images/prune API endpoint, enabling programmatic deletion of unused images with optional filtering capabilities.
Changes:
- Implements a new
prunemethod in theDockerImagesclass with support for filtering by dangling status, timestamp, and labels - Adds comprehensive test coverage for the new prune functionality with and without filters
- Updates documentation with contributor attribution and changelog entries
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| aiodocker/images.py | Implements the prune method with filter support and documentation |
| tests/test_images.py | Adds two test cases covering prune with filters and without filters |
| CONTRIBUTORS.txt | Adds Mike Degatano to contributors list |
| CHANGES/1001.feature.md | Adds changelog entry for the new feature |
| CHANGES/1001.feature | Duplicate changelog entry (same content as .md file) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Looks like actions is broken https://www.githubstatus.com/ |
2f78aaf to
dae861f
Compare
What do these changes do?
Add support for the
images/pruneAPI to the library as detailed here: https://docs.docker.com/reference/api/engine/version/v1.53/#tag/Image/operation/ImagePruneAre there changes in behavior for the user?
New method for a new API, no changes to existing functionality.
Related issue number
Not exactly. #691 is kind of related and was also on my list to make a PR for after images though, assume this one was accepted.
Checklist
CONTRIBUTORS.txtchangesfolder<issue_id>.<type>for example (588.bug)issue_idchange it to the pr id after creating the pr.feature: Signifying a new feature..bugfix: Signifying a bug fix..doc: Signifying a documentation improvement..removal: Signifying a deprecation or removal of public API..misc: A ticket has been closed, but it is not of interest to users.