Commit Graph

54081 Commits

Author SHA1 Message Date
Derek McGowan
37de02378c Prepare release notes for v2.0.0-beta.0
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-09-05 14:11:06 -07:00
Derek McGowan
de4ae66d08 Update client vendor to use tag
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-09-05 14:10:14 -07:00
Austin Vazquez
ed775f1b2c Merge pull request #50916 from thaJeztah/bump_client
go.mod: update client to v0.1.0-beta.0
2025-09-05 14:05:56 -07:00
Sebastiaan van Stijn
b5dde0234c add back replace
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-05 22:47:28 +02:00
Sebastiaan van Stijn
1499623a9d go.mod: update client to v0.1.0-beta.0
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-05 22:46:26 +02:00
Sebastiaan van Stijn
5ad5e5d0c5 Merge pull request #50913 from dmcgowan/prepare-client-0.1.0-beta
Prepare release notes for client/v0.1.0-beta.0
client/v0.1.0-beta.0
2025-09-05 21:59:48 +02:00
Derek McGowan
b5035def03 Prepare release notes for client/v0.1.0-beta.0
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-09-05 11:10:49 -07:00
Derek McGowan
76964752d3 Update client api version to v1.52.0-beta
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-09-05 11:10:49 -07:00
Sebastiaan van Stijn
7777b86d53 Merge pull request #50910 from thaJeztah/api_docs_image_config
api/docs: remove temporary "full" example for image config
api/v1.52.0-beta.1
2025-09-05 19:59:19 +02:00
Sebastiaan van Stijn
ec26e71055 Merge pull request #50911 from thaJeztah/api_swagger_sync
api/docs: sync v1.52 docs with latest
2025-09-05 19:58:57 +02:00
Sebastiaan van Stijn
59c2f2d5bc Merge pull request #50907 from thaJeztah/move_build_options
api/types/build: move build options to client and backend
2025-09-05 19:46:25 +02:00
Sebastiaan van Stijn
a1e3a109ee api/docs: sync v1.52 docs with latest
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-05 19:31:00 +02:00
Sebastiaan van Stijn
0fe1af95f3 api/docs: remove temporary "full" example for image config (v1.50, v1.51)
This example was added in 5e0e34fafd so that
the deprecated fields could be omitted from the example. Those fields were
removed from the swagger in 4dc961d0e9, but
the temporary example was not removed.

This patch removes the example, in favor of the per-field examples, which
were already in place.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-05 19:22:45 +02:00
Sebastiaan van Stijn
7bfbb6e8ca api/swagger: remove temporary "full" example for image config
This example was added in 5e0e34fafd so that
the deprecated fields could be omitted from the example. Those fields were
removed from the swagger in 4dc961d0e9, but
the temporary example was not removed.

This patch removes the example, in favor of the per-field examples, which
were already in place.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-05 19:22:42 +02:00
Sebastiaan van Stijn
4e23f5fd62 Merge pull request #50855 from corhere/network-summary-swagger
api/types/network: generate network-inspect struct definitions from Swagger spec
2025-09-05 19:20:43 +02:00
Austin Vazquez
75fd07c365 Merge pull request #50904 from dmcgowan/prepare-api-1.52-beta
Prepare release notes for api/v1.52.0-beta.0
api/v1.52.0-beta.0
2025-09-05 10:12:19 -07:00
Sebastiaan van Stijn
6b752e0d8b Merge pull request #50909 from thaJeztah/move_LoadResponse
api/types/image: move LoadResponse to client
2025-09-05 18:27:58 +02:00
Sebastiaan van Stijn
2d1af4e4e4 api/types/build: move build options to client and backend
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-05 15:57:05 +02:00
Sebastiaan van Stijn
5232d82c1b daemon/server/backend: move build options to buildbackend
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-05 15:56:56 +02:00
Sebastiaan van Stijn
8b8a3cb14c api/types/image: move LoadResponse to client
It's not the response coming from the API, but a wrapper for a response
reader. We should ultimately remove it.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-05 15:15:42 +02:00
Sebastiaan van Stijn
a064febe14 Merge pull request #50905 from thaJeztah/move_checkpoint_options
api/types/checkpoint: move checkpoint options to client
2025-09-05 13:01:52 +02:00
Akihiro Suda
ae95990cfe Merge pull request #50901 from thaJeztah/bump_cobra
vendor github.com/spf13/pflag v1.0.10, github.com/spf13/cobra v1.10.1
2025-09-05 17:52:14 +09:00
Sebastiaan van Stijn
432c9e81d1 Merge pull request #50772 from austinvazquez/move-build-cache-prune-options-from-api-to-client
api/types/build: move build cache prune options from api to client
2025-09-05 10:33:23 +02:00
Akihiro Suda
b87b041ef8 Merge pull request #50900 from thaJeztah/skip_vm_validate_only
gha: skip "vm" checks if `ci/validate-only` label is set
2025-09-05 17:26:01 +09:00
Sebastiaan van Stijn
a8afc2c6fb api/types/checkpoint: move checkpoint options to client
Move the option-types to the client and in some cases create a
copy for the backend. These types are used to construct query-
args, and not marshaled to JSON, and can be replaced with functional
options in the client.

The CreateOptions type was used both as options-struct for the client,
and as struct to marshal/unmarshal the request. For this type, a copy
is created in the Client and a new `checkpoint.CreateRequest` is added
in the API.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-05 10:20:06 +02:00
Sebastiaan van Stijn
a45639af26 Merge pull request #50897 from thaJeztah/move_container_options
api/types/container: move container options to client
2025-09-05 09:29:56 +02:00
Derek McGowan
d904f3b625 Prepare api/1.52.0-beta releases
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-09-04 22:54:01 -07:00
Derek McGowan
4e30076e4d Add mailmap entry for Austin
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-09-04 22:53:40 -07:00
Cory Snider
e656f39952 api/t/network: generate more structs from Swagger
Replace hand-rolled struct definitions for api/types/network with
types generated from the Swagger definitions:
  - ConfigReference
  - EndpointResource
  - NetworkingConfig
  - PeerInfo
  - ServiceInfo
  - Task

Add Swagger definitions for ServiceInfo and Task.

Signed-off-by: Cory Snider <csnider@mirantis.com>
2025-09-04 19:46:44 -04:00
Cory Snider
ea1c2530da api/t/network: generate Inspect, Summary structs
Replace the hand-rolled Network, Summary and Inspect struct types in
api/types/network with types generated from the Swagger definition.

Disable the generation of all unwanted marshalers and unmarshalers.

Signed-off-by: Cory Snider <csnider@mirantis.com>
2025-09-04 19:46:43 -04:00
Austin Vazquez
26e335b647 api/types/build: move CachePruneOptions to client mod
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
2025-09-04 16:33:57 -05:00
Sebastiaan van Stijn
798abe8965 vendor: github.com/spf13/cobra v1.10.1
full diff: https://github.com/spf13/cobra/compare/v1.9.1...v1.10.1

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-04 23:27:39 +02:00
Sebastiaan van Stijn
02a50be1f9 vendor: github.com/spf13/pflag v1.0.10
full diff: https://github.com/spf13/pflag/compare/v1.0.6...v1.0.10

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-04 23:27:02 +02:00
Sebastiaan van Stijn
3eceb2d0e9 Merge pull request #50899 from thaJeztah/sync_swagger_docs
api/docs: update v1.52 docs with current swagger
2025-09-04 22:58:19 +02:00
Sebastiaan van Stijn
aaa9dd4e26 gha: skip "vm" checks if ci/validate-only label is set
commit f0c069ffc9 added support for a
`ci/validate-only` label to skip tests and only run the validation checks.
Commit 09ecd74cf3 was merged later, but was
authored before that feature was merged, so did not account for the label,
so the "vm" checks would always run.

This applies the additional conditions to skip the "vm" checks if the
`ci/validate-only` label is set.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-04 22:21:19 +02:00
Sebastiaan van Stijn
ccf1363680 api/docs: update v1.52 docs with current swagger
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-04 21:52:11 +02:00
Cory Snider
c208f90796 api/templates: vendor structfield template
Taken verbatim from
eee6eaf67f/generator/templates/structfield.gotmpl
so the alterations from the upstream template can be easily diffed.

Signed-off-by: Cory Snider <csnider@mirantis.com>
2025-09-04 15:38:14 -04:00
Sebastiaan van Stijn
6da8589ebe Merge pull request #50878 from corhere/network-inspect-concrete-type
api/types/network: separate Summary from Inspect
2025-09-04 21:36:00 +02:00
Austin Vazquez
749ec81706 Merge pull request #50799 from thaJeztah/touchup_delete
image delete: inline some variables, and touch-up TODOs
2025-09-04 12:27:30 -07:00
Sebastiaan van Stijn
10f683eeef Merge pull request #50893 from austinvazquez/make-image-inspect-driver-data-optional
api/types/image: make `InspectResponse.GraphDriver` optional
2025-09-04 21:08:26 +02:00
Sebastiaan van Stijn
d019451022 Merge pull request #50850 from corhere/addrset-popcnt
d/libn/internal/addrset: add popcount methods
2025-09-04 21:04:22 +02:00
Sebastiaan van Stijn
0bfc33c70b Merge pull request #50856 from corhere/swagger-gen-script-cleanup
hack: use heredocs in generate-swagger-api.sh
2025-09-04 20:59:06 +02:00
Sebastiaan van Stijn
aead9964f3 Merge pull request #50586 from olljanat/endpoint-name-label
libnetwork: provide endpoint name for IPAM drivers
2025-09-04 20:20:25 +02:00
Sebastiaan van Stijn
57ce548341 client: move container options together with their users
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-04 20:09:58 +02:00
Sebastiaan van Stijn
4d20b6fe56 api/types/container: move container options to client
Move the option-types to the client and in some cases create a
copy for the backend. These types are used to construct query-
args, and not marshaled to JSON, and can be replaced with functional
options in the client.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-04 20:09:55 +02:00
Austin Vazquez
c441b2ef19 api/types/image: make InspectResponse.GraphDriver optional
This change makes the `GraphDriver` field in `image.InspectResponse` optional. This field will only be returned when using moby engine graph drivers as a backend storage implementation. It will be omitted when using the containerd image backend.

Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
2025-09-04 13:04:10 -05:00
Cory Snider
1a86389419 api/types/network: separate Summary from Inspect
While the network Summary and Inspect types have been aliases in Go's
type system, in practice there is a difference: the Containers and
Services fields are only populated when inspecting a network. Split out
the common fields into a base network.Network struct which is embedded
in the network.Summary and network.Inspect types.

Signed-off-by: Cory Snider <csnider@mirantis.com>
2025-09-04 13:51:28 -04:00
Cory Snider
291e129631 Merge pull request #50860 from corhere/network-filter-iface
daemon: filter networks before converting to API types
2025-09-04 13:48:07 -04:00
Cory Snider
f8bd170b2a daemon: validate args in network.New*Filter
Filter-term validation does not belong in the API module. Clients should
not be making any assumptions about which terms the daemon understands.
Users should not need to upgrade their clients to use filter terms
introduced in a newer daemon. Move the network filter validation from
the api module into the daemon.

Split network.NewFilter into network.NewListFilter and
network.NewPruneFilter constructors which validate the filter terms,
enforcing the invariant that any network.Filter is a well-formed filter
for networks.

The network route handlers have been leveraging a hidden 'idOrName'
filter term that is not listed in the set of accepted filters and
therefore not accepted in API client requests. And it's a good thing
that it was never part of the API: it is completely broken and not fit
for purpose! When a filter contains an idOrName term, the term values
are ignored and instead the filter tests whether either the 'id' or
'name' terms match the Name of the network. Unless the filter contains
both 'id' and 'name' terms, the match will evaluate to true for all
networks! None of the daemon-internal users of 'idOrName' set either
of those terms, therefore it has the same effect as if the filter did
not contain the 'idOrName' term in the first place.

Filtering networks by id-or-name is a quirky thing that the daemon needs
to do to uphold its end of the Engine API contract, not something that
would be of use to clients. Fixing up the idOrName filter would
necessitate adding it to the list of accepted terms so the filter passes
validaton, which would have the side effect of also making the filter
available to API clients. Instead, add an exported field to the Filter
struct so that daemon code can opt into the internal-only behaviour of
having the 'id' term match on either the network Name or ID.

Signed-off-by: Cory Snider <csnider@mirantis.com>
2025-09-04 12:49:31 -04:00
Cory Snider
ea1dfbda9e daemon: prune networks using network.Filter
Construct a network.Filter from the filters.Args only once per API
request so we don't waste cycles re-validating an already validated
filter. Since (*Daemon).NetworksPrune is implemented in terms of
(Cluster).GetNetworks, that method now accepts a network.Filter instead
of a filter.Args. Change the signature of (*Daemon).GetNetworks for
consistency as both of the GetNetworks methods are used by network API
route handlers.

Signed-off-by: Cory Snider <csnider@mirantis.com>
2025-09-04 12:49:31 -04:00