Use a cancelReadCloser to automatically close the reader when the context
is cancelled. Consumers are still recommended to manually close the reader,
but the cancelReadCloser makes the Close idempotent.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Use a cancelReadCloser to automatically close the reader when the context
is cancelled. Consumers are still recommended to manually close the reader,
but the cancelReadCloser makes the Close idempotent.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Use a cancelReadCloser to automatically close the reader when the context
is cancelled. Consumers are still recommended to manually close the reader,
but the cancelReadCloser makes the Close idempotent.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Small utility to automatically close an io.ReadCloser when the
context is cancelled, but allowing the caller to close manually
as well.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
All methods are singular; while pruning will impact multiple items,
it's more consistent to use singular for all operations.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
bin-image workflow was failing for the new docker tags
(`docker-v29.0.0-rc.2`) because it wasn't correctly picked up by the
condition that should filter out tags.
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
- Add WS2025 to Windows matcher and code optimizations
- use windowsMatchComparer for OSVersion match order
Windows OS version should match based on the full OSVersion. When
sorting a manifest, the entries should be sorted using the `Less`
function.
full diff: https://github.com/containerd/platforms/compare/v1.0.0-rc.1...v1.0.0-rc.2
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This change adds type specific fields to `GET /system/df` endpoint with high level information of disk usage. This change also introduces `verbose` query to the endpoint so that detailed information is by default excluded unless queried to reduce memory consumption. The previous top level `DiskUsage` fields (`Images`, `Containers`, `Volumes` and `BuildCache`) are now deprecated and kept for backwards compatibility.
Co-authored-by: Claude <noreply@anthropic.com>
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
Writing the OCI manifest file to the blobs/digest dir will update the
directory mtime, producing a tar file containing a member with a
contemporary mtime. Exported tars for the same image will therefore have
different checksums.
Although this was previously addressed by overriding the mtime manually
to 0, this was done before the OCI manifest file was written. This
change simply moves the call to system.Chtimes to set the mtime of the
blobs/digest directory to 0 after writing the OCI manifest file.
This commit also updates the TestSaveCheckTimes integration test to
check the mtime of all members in the exported tar to ensure that all
mtime are not newer than img.Created or 0 (depending on whether the
containerd-snapshotter is disabled or enabled, respectively).
Signed-off-by: Sam Nicholls <sam.nicholls@nanoporetech.com>
Migrate TestAPIStatsContainerNotFound from the deprecated integration-cli
test suite to the modern integration test framework in integration/container.
The test verifies that the container stats API returns a NotFound error
for non-existent containers, testing both streaming and non-streaming modes.
Changes made:
- Migrated test to integration/container/stats_test.go using standard
Go testing patterns
- Refactored to use test array pattern for better test organization
- Removed test from integration-cli/docker_api_stats_test.go
- Removed unused imports from integration-cli file
- Removed Windows skip as it may not be necessary
Signed-off-by: Salim Dohri <dohri.salim@gmail.com>