Commit Graph

54223 Commits

Author SHA1 Message Date
Cory Snider
ee8abb845d d/libnetwork: move uint128 to its own package
The uint128 type is very convenient for manipulating 128 bit-wide
quantities, as tends to come up in several contexts when working with
IPv6. Move it into a libnetwork/internal/ package so it can be reused
elsewhere within libnetwork.

Signed-off-by: Cory Snider <csnider@mirantis.com>
2025-09-10 11:00:35 -04:00
Cory Snider
65ffac3dbf internal/iterutil: add Chain, Chain2 iterators
Add utilities to concatenate multiple iterators of the same type into a
single iterator.

Signed-off-by: Cory Snider <csnider@mirantis.com>
2025-09-10 11:00:34 -04:00
Paweł Gronowski
2e12287747 Merge pull request #50950 from vvoland/replace-vendor
go.mod: replace client
2025-09-10 16:30:34 +02:00
Paweł Gronowski
ee24728b1e go.mod: replace client
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-09-10 15:40:31 +02:00
Sebastiaan van Stijn
139b6464b5 api/docs: fix events example response
Don't include the deprecated `id`, `status`, and `from` fields
in the response; they're no longer part of the API since v1.22
([moby@72f188]).

[moby@72f188]: 72f1881df1

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-10 14:37:53 +02:00
Sebastiaan van Stijn
50c073c7ed Merge pull request #50928 from akerouanton/re-add-replace-rule
go.mod: re-add replace github.com/moby/moby/api
2025-09-10 14:37:30 +02:00
Paweł Gronowski
7567f9754c Merge pull request #50937 from vvoland/gha-vm
gha: extract vm test to a separate workflow
2025-09-09 18:45:02 +02:00
Paweł Gronowski
8849871630 Merge pull request #50930 from vvoland/client-imageinspect-removeapiopts
client: remove ImageInspectWithAPIOpts function
2025-09-09 18:25:30 +02:00
Paweł Gronowski
bdd0a2a970 gha: extract vm test to a separate workflow
`vm` is quite lengthy which makes it impossible to restart other failed
(flaky) jobs from the `test` workflow before the `vm` finishes.

This patch moves it to a separate workflow to allow retrying other jobs
independently.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-09-09 17:34:25 +02:00
Sebastiaan van Stijn
fcd536fd26 Merge pull request #50936 from vvoland/remove-7zip4ps
Dockerfile.windows: remove deprecated 7Zip4Powershell
2025-09-09 17:21:02 +02:00
Paweł Gronowski
8c8324b37f Dockerfile.windows: remove deprecated 7Zip4Powershell
`tar` utility is included in Windows 10 (17063+) and Windows Server
2019+ so we can use it directly.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-09-09 15:44:07 +02:00
Albin Kerouanton
f835ff6987 Merge pull request #50289 from akerouanton/cleanup-windows-portmapper
libnet/portmapper: clean up windows port mapper
2025-09-08 22:52:45 +02:00
Paweł Gronowski
9d2e74d43d gha: Add automatic PR labeling for modules
Sets up the labeler workflow to automatically label PRs affecting the
`client` and `api` modules.

This allows to distinguish PRs targetting different modules.

TODO: Figure out how to handle PRs that would end up with both labels.
However, I think it's good to see what PRs would that affect.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-09-08 22:36:45 +02:00
Paweł Gronowski
705f26010e client/image_inspect: Unexport ImageInspectOptions
This should be an implementation detail and should not be exported.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-09-08 22:25:25 +02:00
Paweł Gronowski
67c8064bb3 client: remove ImageInspectWithAPIOpts function
This function was providing a way to set all API options directly,
however the api type was moved to client in 853aed1 so this option no
longer makes sense as it's exposing a part of the private struct at this
point.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-09-08 22:25:25 +02:00
Albin Kerouanton
5303799297 go.mod: re-add replace github.com/moby/moby/api
This was removed in 7696475 to prepare the release of
client/v0.1.0-beta.0 — re-add it.

Signed-off-by: Albin Kerouanton <albinker@gmail.com>
2025-09-08 20:07:32 +02:00
Albin Kerouanton
604dfe5f47 Merge pull request #50906 from randomnoise/sctp-check
contrib/check-config: check SCTP protocol option
2025-09-08 14:24:59 +02:00
Sebastiaan van Stijn
1bf4bc8511 Merge pull request #50923 from thaJeztah/testutil_internal
testutil: move back to internal and merge internal/testutils
2025-09-08 12:46:51 +02:00
Albin Kerouanton
2f1015482f libnet/d/windows: ReleasePorts: use errors.Join
Signed-off-by: Albin Kerouanton <albinker@gmail.com>
2025-09-08 11:40:09 +02:00
Albin Kerouanton
fc86411353 libnet/d/windows: inline releasePort
releasePort is a one-liner and is called only in one place. Inline it.

Signed-off-by: Albin Kerouanton <albinker@gmail.com>
2025-09-08 11:37:08 +02:00
Albin Kerouanton
9efc1cc264 libnet/portmapper: rename, move PortMapper to portallocator
The only viable way to allocate a port is to bind and listen to it. So,
the windows PortMapper was really a PortAllocator in disguise.

Rename it to OSAllocator and move it to the portallocator package.

Signed-off-by: Albin Kerouanton <albinker@gmail.com>
2025-09-08 11:32:21 +02:00
Sebastiaan van Stijn
4b230a4909 internal/testutils: merge with internal/testutil
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-08 10:08:35 +02:00
Sebastiaan van Stijn
d3e45f8743 testutil: move back to internal
This package was originally internal, but was moved out when BuildKit
used it for its integration tests. That's no longer the case, so we
can make it internal again.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-08 10:08:30 +02:00
Albin Kerouanton
af677b61a5 libnet/portmapper: clean up windows port mapper
The windows port mapper is needlessly complex while its job is pretty
straightforward: reserve a port through the port allocator, and start a
dummy proxy to allocate it from the OS.

The biggest source of complexity is the use of the `net.Addr` interface
to pass the host IP, port and proto. `MapRange` now has a proto arg, and
returns the allocated port.

`MapRange` is also instantiating a `mapping` struct whose fields are
all unused, except for its `stopUserlandProxy`. Instead, store
`stopProxy` callbacks directly into the `PortMapper`.

Signed-off-by: Albin Kerouanton <albinker@gmail.com>
2025-09-08 10:05:29 +02:00
Albin Kerouanton
90f31c6c27 libnet/portmapper: remove dead field bridgeName
This field is not referenced by anything. Drop it.

Signed-off-by: Albin Kerouanton <albinker@gmail.com>
2025-09-08 09:55:09 +02:00
Albin Kerouanton
f6e5b3afc5 libnet/portmapper: drop unused NewWithPortAllocator
This function is only called by New, and it takes the singleton
PortAllocator exposed by the portallocator package.

Remove this function and instantiate the PortMapper directly from New
constructor.

Signed-off-by: Albin Kerouanton <albinker@gmail.com>
2025-09-08 09:55:05 +02:00
Albin Kerouanton
9e7de1b679 libnet/portmapper: remove unused field proxyPath
Signed-off-by: Albin Kerouanton <albinker@gmail.com>
2025-09-08 09:55:02 +02:00
Albin Kerouanton
f6c59f9779 libnet/portmapper: merge mapper.go & mapper_windows.go
The portmapper struct provided by libnet/portmapper is only available
on Windows. Merge both files to reflect that.

Signed-off-by: Albin Kerouanton <albinker@gmail.com>
2025-09-08 09:52:33 +02:00
Albin Kerouanton
b48442db4c libnet/portmapper: remove dead DeleteForwardingTableEntry
Prior to commit 4f09af626, DeleteForwardingTableEntry had a Linux
implementation. That's not the case anymore, and it's a no-op on
Windows. Remove it.

Signed-off-by: Albin Kerouanton <albinker@gmail.com>
2025-09-08 09:52:14 +02:00
Albin Kerouanton
32710d3e5e libnet/portmapper: remove dead AppendForwardingTableEntry
Prior to commit 4f09af626, AppendForwardingTableEntry had a Linux
implementation. That's not the case anymore, and it's a no-op on
Windows. Remove it.

Signed-off-by: Albin Kerouanton <albinker@gmail.com>
2025-09-08 09:11:33 +02:00
Akihiro Suda
22e8c7f3cf Merge pull request #50921 from thaJeztah/stats_errdefs
daemon: GetContainerStats: use errdefs for error-type handling
2025-09-08 11:58:00 +09:00
Akihiro Suda
102bb39566 Merge pull request #50920 from thaJeztah/errdefs_cleanup
errdefs: remove deprecated IsXXX utilities
2025-09-08 11:56:03 +09:00
Sebastiaan van Stijn
eb2e296711 daemon: GetContainerStats: use errdefs for error-type handling
Use the errdefs utilities to make sure we correctly detect the type
of error if a containerd errdefs type is returned.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-06 02:20:31 +02:00
Sebastiaan van Stijn
97eceb266a errdefs: remove deprecated IsXXX utilities
These were deprecated in f1bb44aeee, and
the IsContext is no longer used. They are not carried forward in the
new module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-06 02:08:04 +02:00
Sebastiaan van Stijn
312c247990 Merge pull request #50914 from corhere/testutil-footguns
testutil/daemon: fix some footguns for running integration tests interactively
2025-09-06 02:03:43 +02:00
Austin Vazquez
9760b1f300 Merge pull request #50918 from dmcgowan/prepare-v2.0.0-beta
Prepare release notes for v2.0.0-beta.0
v2.0.0-beta.0
2025-09-05 16:49:30 -07:00
Austin Vazquez
0bd92cde21 Merge pull request #50919 from thaJeztah/generate_authors
update AUTHORS
2025-09-05 16:10:40 -07:00
Sebastiaan van Stijn
2d73fed24e update AUTHORS
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-05 23:44:35 +02:00
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
0525ae2aed api: image inspect: remove temporary backfill for Config fields
Commit 4dc961d0e9 (API v1.50) fixed the type
used for Config to point to the correct type, which is the Config struct
from the [Docker image spec] (which embeds the [OCI Image Specification]
type); however, those types use an omitempty, which wasn't documented as
part of the API changes, so f85394dd5d added
a temporary backfill for empty fields.

This removes that backfill for API v1.52 so that empty image config fields
are now omitted.

[OCI Image Specification]: https://github.com/opencontainers/image-spec/blob/v1.1.1/specs-go/v1/config.go#L23-L62
[Docker image spec]: https://github.com/moby/docker-image-spec/blob/v1.3.1/specs-go/v1/image.go#L19-L32

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-05 22:15:54 +02:00
Cory Snider
d98a8c59ab testutil/daemon: fail gracefully if DEST is unset
If neither of the DOCKER_INTEGRATION_DAEMON_DEST or DEST environment
variables are set, integration tests panic with a nil-dereference panic
in os.(*File).Name(...). This is a very unhelpful behaviour for someone
trying to run integration tests interactively. Fix up the logic to avoid
dereferencing nil os.File pointers and instead fail the test immediately
with an actionable error message.

Signed-off-by: Cory Snider <csnider@mirantis.com>
2025-09-05 16:09:14 -04:00
Cory Snider
8995619b9d testutil/daemon: fix DOCKER_USERLANDPROXY env var
An inverted condition resulted in integration tests disabling the
userland proxy if the DOCKER_USERLANDPROXY environment variable is set
to a value that strconv.ParseBool cannot parse, leading to the confusing
behaviour of DOCKER_USERLANDPROXY=0 enabling the userland proxy and
DOCKER_USERLANDPROXY=foo disabling it. Fix up the logic so that
DOCKER_USERLANDPROXY=0 disables the userland proxy and
DOCKER_USERLANDPROXY=foo is an error.

Signed-off-by: Cory Snider <csnider@mirantis.com>
2025-09-05 16:09:14 -04: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