Sebastiaan van Stijn
598618b6f2
TestBuildWithInaccessibleFilesInContext: use sub-tests
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-11-10 12:40:12 +01:00
Sebastiaan van Stijn
c5aedacb4f
client: Client.ContainerExport: close reader on context cancellation
...
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 >
2025-11-06 00:07:57 +01:00
Sebastiaan van Stijn
d299e5be83
api/types/swarm: define type for UpdateOrder
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-11-05 12:50:51 +01:00
Sebastiaan van Stijn
b552b8b729
api/types/swarm: define type for FailureAction
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-11-05 12:50:48 +01:00
Paweł Gronowski
47edd80d97
integration-cli: Adjust nofile limits
...
runc v1.3.3 needs more file descriptors now.
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com >
2025-11-05 11:28:35 +01:00
Salim Dohri
9b749d7c85
integration-cli: migrate TestAPIStatsContainerNotFound to integration tests
...
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 >
2025-11-02 10:46:22 +01:00
Sebastiaan van Stijn
455e4e523f
Merge pull request #51269 from austinvazquez/refactor-client-network
...
client: refactor create network api implementation to define options/result struct
2025-10-31 15:46:53 +01:00
Sebastiaan van Stijn
6aea8c2591
Dockerfile: update integration-cli CLI to v25.0.5
...
Now that we're raising the minimum API version, we can also update
the CLI used in our integration-cli tests.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-10-31 09:22:40 +01:00
Austin Vazquez
a087d03e0c
client: refactor create network api implementation to wrap options/results
...
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com >
2025-10-30 23:45:18 -05:00
Sebastiaan van Stijn
d1f70d4f54
client: deprecate NewClientWithOpts in favor of New
...
Use a more idiomatic name so that it can be used as `client.New()`.
We should look if we want `New()` to have different / updated defaults
i.e., enable `WithEnv` as default, and have an opt-out and have API-
version negotiation enabled by default (with an opt-out option).
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-10-30 18:09:44 +01:00
Austin Vazquez
860307c4ea
client: refactor ServerVersion to return ServerVersionResult
...
Co-Authored-By: Claude <noreply@anthropic.com >
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com >
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-10-30 14:22:41 +01:00
Austin Vazquez
c5e318dbde
Merge pull request #51328 from vvoland/client-containercopy-structs
...
client/container_copy: Wrap options and result struct
2025-10-29 10:44:59 -05:00
Paweł Gronowski
1cc2ab16ce
client/container_copy: Wrap options and result struct
...
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com >
2025-10-29 14:34:19 +01:00
Sebastiaan van Stijn
e9631b507e
Merge pull request #51323 from thaJeztah/container_wait_nits
...
client: ContainerWait: touch-up GoDoc, and remove legacy code, and use singular for channels (ContainerWaitResult)
2025-10-29 13:41:02 +01:00
Paweł Gronowski
c755b9635d
Merge pull request #51322 from vvoland/client-fixup
...
client: Rename ContainerUnPause* to ContainerUnpause*
2025-10-29 12:56:32 +01:00
Paweł Gronowski
f708214dbf
Merge pull request #51324 from thaJeztah/network_connect_disconnect
...
api/types/network: define `ConnectRequest` and `DisconnectRequest`
2025-10-29 12:56:15 +01:00
Sebastiaan van Stijn
29ad05b130
client: ContainerWaitResult: use singular for channels
...
These channels should ever only return a single result, so rename
them to match that expectation.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-10-29 12:37:46 +01:00
Sebastiaan van Stijn
7041c02abd
Merge pull request #51320 from thaJeztah/refactor_client_system_step1
...
client: refactor Events, Info, RegistryLogin
2025-10-29 12:25:28 +01:00
Austin Vazquez
bae45f766d
api/types/network: define ConnectRequest and DisconnectRequest
...
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com >
2025-10-29 11:44:18 +01:00
Paweł Gronowski
fc97a2ff0d
client: Rename ContainerUnPause* to ContainerUnpause*
...
To better match the method name itself
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com >
2025-10-29 11:32:32 +01:00
Sebastiaan van Stijn
d3eb04fe59
Merge pull request #51312 from austinvazquez/refactor-client-container-wait
...
client: refactor ContainerWait to use client defined options/results structs
2025-10-29 11:12:52 +01:00
Sebastiaan van Stijn
a0f877d1b3
Merge pull request #51316 from austinvazquez/refactor-client-container-export
...
client: refactor `ContainerExport` to wrap options/result structs
2025-10-29 10:01:07 +01:00
Austin Vazquez
e46058cbae
client: refactor Events, Info, RegistryLogin
...
Co-authored-by: Claude <noreply@anthropic.com >
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com >
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-10-29 09:36:23 +01:00
Sebastiaan van Stijn
c438b3fbbf
Merge pull request #51314 from austinvazquez/refactor-client-container-list
...
client: refactor `ContainerList` to wrap result
2025-10-29 08:31:22 +01:00
Austin Vazquez
749c980d4e
client: refactor ContainerExport to wrap options/result structs
...
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com >
2025-10-28 19:39:13 -05:00
Austin Vazquez
ec22a1e5b2
client: refactor ContainerTop to wrap options and results
...
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com >
2025-10-28 18:54:43 -05:00
Austin Vazquez
c5ddef1122
client: refactor ContainerList to wrap result
...
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com >
2025-10-28 18:52:52 -05:00
Austin Vazquez
cf173bc941
client: refactor ContainerWait to use client defined options/results structs
...
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com >
2025-10-28 18:15:01 -05:00
Sebastiaan van Stijn
1f5c82b9fa
client: add option and output structs for various container methods
...
Add option- and output structs for;
- Client.ContainerKill
- Client.ContainerPause
- Client.ContainerRemove
- Client.ContainerResize
- Client.ContainerRestart
- Client.ContainerStart
- Client.ContainerStop
- Client.ContainerUnpause
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-10-27 23:46:28 +01:00
Sebastiaan van Stijn
8118385ba8
client: ContainerStats: add option, output-structs, remove ContainerStatsOneShot
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-10-27 14:03:55 +01:00
Sebastiaan van Stijn
f7003ef7de
integration-cli: minor cleanups in stats tests
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-10-27 12:45:12 +01:00
Sebastiaan van Stijn
5742b40c87
integration-cli: simplify, improve some stats tests
...
Remove the go-routines and just fetch the result for non-streaming stats.
Also check for the result to be valid for some tests.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-10-27 12:45:05 +01:00
Sebastiaan van Stijn
e690c84bed
integration-cli: remove TestAPIStatsNetworkStatsVersioning
...
It was a leftover for pre-API v1.21 tests.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-10-27 12:43:48 +01:00
Sebastiaan van Stijn
e410daf8f7
integration-cli: TestContainerAPIStatsWithNetworkDisabled: check result
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-10-27 10:55:01 +01:00
Sebastiaan van Stijn
425975313a
client: merge ContainerInspectWithRaw with ContainerInspect
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-10-24 22:01:23 +02:00
Sebastiaan van Stijn
832590155c
client: ExecCreateResult: define local type with ID field
...
The `ExecCreateResult` was embedding the `container.ExecCreateRespons`,
which in itself was an alias for `common.IDResponse`. This type has a
single field (`ID`) currently, but the embedding made it awkward to use,
for example, when mocking a `ExecCreateResult` using struct-literals:
func execCreateWithID(_ string, _ client.ExecCreateOptions) (client.ExecCreateResult, error) {
return client.ExecCreateResult{ExecCreateResponse: container.ExecCreateResponse{ID: "execid"}}, nil
}
This patch defines it as a local type with the `ID` as field.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-10-24 15:05:35 +02:00
Sebastiaan van Stijn
f9082484c9
Merge pull request #51278 from vvoland/client-container-opts2
...
client_(attach,commit,create,diff): Wrap result and options
2025-10-24 13:41:23 +02:00
Austin Vazquez
f40e1a7582
api: move types/versions to client/pkg and daemon/internal
...
This change moves the api/types/versions package out into client and daemon versions.
Co-authored-by: Claude <noreply@anthropic.com >
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com >
2025-10-23 19:22:31 -05:00
Paweł Gronowski
8fb561ca9a
client/container_create: Add Image outside of Config
...
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com >
2025-10-23 21:11:30 +02:00
Paweł Gronowski
3340c86db9
client/container_create: Rename ContainerName to Name
...
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com >
2025-10-23 21:11:30 +02:00
Paweł Gronowski
bd31b8b1c7
client_(attach,commit,create,diff): Wrap result and options
...
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com >
2025-10-23 21:11:30 +02:00
Sebastiaan van Stijn
3a43b5b559
client: refactor ServiceCreate, ServiceUpdate, SwarmUpdate
...
Put the version and spec in the options-struct, as we did for other
swarm-related methods.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-10-23 15:40:18 +02:00
Sebastiaan van Stijn
11809618f6
Merge pull request #51270 from robmry/inspect-api-bc
...
Inspect: API v1.51 compatibility
2025-10-23 14:59:11 +02:00
Rob Murray
0971a3bcb8
Inspect: API v1.51 compatibility
...
For API < v1.52:
- In container inspect:
- Restore GraphDriver when a snapshotter is used.
- Remove field Storage
- Related to commit efa077848f
- In image inspect:
- Restore GraphDriver when a snapshotter is used.
- Related to commit c441b2ef19
Co-authored-by: Sebastiaan van Stijn <github@gone.nl >
Signed-off-by: Rob Murray <rob.murray@docker.com >
2025-10-23 09:24:08 +01:00
Paweł Gronowski
94ab385eb5
client/container_exec: Wrap options and result, rename to Exec
...
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com >
2025-10-22 22:48:59 +02:00
Paweł Gronowski
eddf1a1ad6
Merge pull request #51260 from vvoland/client-node-opts
...
client/node: Wrap options and output
2025-10-22 13:09:21 +02:00
Sebastiaan van Stijn
78d228b84e
Merge pull request #51258 from thaJeztah/client_ping
...
api/types: move Ping and swarm.Status to client
2025-10-22 12:47:42 +02:00
Paweł Gronowski
7ceea4148a
client/node: Wrap options and output
...
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com >
2025-10-22 12:02:05 +02:00
Sebastiaan van Stijn
25c509b026
Merge pull request #51251 from thaJeztah/secret_refactor
...
client/secrets: Wrap results and options
2025-10-22 11:50:01 +02:00
Sebastiaan van Stijn
8dc5d1e64d
api/types: move Ping and swarm.Status to client
...
The API does not produce these as a response; the fields in the Ping
struct, including the Swarm status are propagated from headers returned
by the /_ping endpoint.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-10-22 11:05:08 +02:00