Commit Graph

55324 Commits

Author SHA1 Message Date
Austin Vazquez
72ce2c3f82 doc: fix module definition
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
2025-12-16 15:56:57 -06:00
Paweł Gronowski
8316b79e04 Merge pull request #51735 from thaJeztah/bump_cobra
vendor: github.com/spf13/cobra v1.10.2
2025-12-16 18:30:07 +00:00
Paweł Gronowski
57658e4121 Merge pull request #51676 from thaJeztah/bump_golangci_lint
Dockerfile: update golangci-lint to v2.7.2
2025-12-16 16:03:59 +00:00
Sebastiaan van Stijn
1f532963ed golangci-lint: remove unused exclusion rule
WARN [runner/exclusion_rules] Skipped 0 issues by rules: [Text: "type name will be used as (container|volume)\\.(Container|Volume).* by other packages, and that stutters; consider calling this", Path: "api/types/(volume|container)/", Linters: "revive"]

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-12-16 16:55:33 +01:00
Sebastiaan van Stijn
9cd41375ce Dockerfile: update golangci-lint to v2.7.2
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-12-16 16:55:32 +01:00
Sebastiaan van Stijn
1f498c5ff0 fix linting issues
Some false positives from gosec (G602: slice index out of range)

    integration-cli/daemon/daemon.go:109:1: deprecatedComment: `Deprecated: ` notices should be in a dedicated paragraph, separated from the rest (gocritic)
    // Deprecated: use cli.WaitCmd instead
    ^
    integration-cli/docker_cli_build_test.go:562:3: dupOption: function argument `build.WithFile("test_file3", "test3")` is duplicated (gocritic)
            build.WithFile("test_file3", "test3"),
            ^
    integration-cli/docker_utils_test.go:250:1: deprecatedComment: `Deprecated: ` notices should be in a dedicated paragraph, separated from the rest (gocritic)
    // Deprecated: use cli.WaitFor
    ^
    daemon/libnetwork/ipams/defaultipam/address_space.go:45:39: G602: slice index out of range (gosec)
            if predefined[j].Overlaps(predefined[i].Base) {
                                                ^
    daemon/libnetwork/ipams/defaultipam/address_space.go:49:29: G602: slice index out of range (gosec)
            predefined[j] = predefined[i]
                                      ^
    daemon/libnetwork/libnetwork_linux_test.go:1492:9: G602: slice index out of range (gosec)
            sboxes[thd-1], err = controller.NewSandbox(context.Background(), fmt.Sprintf("%drace", thd))
                  ^
    daemon/libnetwork/networkdb/cluster_test.go:111:21: G602: slice index out of range (gosec)
                mean, stdev := nf[0], nf[1]
                                 ^
    daemon/libnetwork/osl/interface_linux.go:586:54: G602: slice index out of range (gosec)
                log.G(ctx).WithField("portState", stateFileContent[0]).Debug("waiting for bridge port to be forwarding")
                                                                  ^
    daemon/libnetwork/osl/interface_linux.go:594:32: G602: slice index out of range (gosec)
            "portState": stateFileContent[0],
                                         ^
    daemon/libnetwork/portallocator/osallocator_linux_test.go:358:13: G602: slice index out of range (gosec)
            if payload[0] != 0x1 {
                      ^
    daemon/libnetwork/portallocator/osallocator_linux_test.go:359:68: G602: slice index out of range (gosec)
                readCh <- fmt.Errorf("expected payload 0x1, but got %x", payload[0])
                                                                                ^
    daemon/logger/gelf/gelf_test.go:197:9: nilness: impossible condition: nil != nil (govet)
        if err != nil {
               ^

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-12-16 16:55:20 +01:00
Paweł Gronowski
d83a2e644a Merge pull request #51734 from thaJeztah/bump_etcd
vendor: go.etcd.io/etcd/* v3.6.6
2025-12-16 15:21:23 +00:00
Sebastiaan van Stijn
366044fc20 vendor: github.com/spf13/cobra v1.10.2
Migrate from gopkg.in/yaml.v3 to go.yaml.in/yaml/v3

full diff: https://github.com/spf13/cobra/compare/v1.10.1...v1.10.2

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-12-16 16:12:07 +01:00
Sebastiaan van Stijn
c2073cc7e2 vendor: go.etcd.io/etcd/* v3.6.6
No changes in vendored code

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-12-16 15:25:03 +01:00
Sebastiaan van Stijn
1cce55d3a4 Merge pull request #51714 from jschfflr/45939-rw-layer-cleanup
layer: Clean up RW layer if mount metadata save fails
2025-12-16 15:01:54 +01:00
Sebastiaan van Stijn
b2d84a3ef5 Merge pull request #51732 from thaJeztah/sync_swagger_docs
api/docs: move ImageHistoryResponseItem to definitions (API v1.25-v1.52)
2025-12-16 13:50:34 +01:00
Paweł Gronowski
1489cb3ae0 Merge pull request #51722 from vvoland/modernize
Modernize Go code
2025-12-16 12:38:36 +00:00
Paweł Gronowski
c9ece9b01f Merge pull request #51706 from vvoland/project-branches
project: Update branches/tags and patch releases
2025-12-16 12:36:15 +00:00
Paweł Gronowski
5d716f20a3 Merge pull request #51721 from vvoland/deprecate-grpc
api: deprecate /grpc and /session endpoints
2025-12-16 12:34:55 +00:00
Paweł Gronowski
0ae3f972ad daemon: Simplify slices.Contains usage
Remove unnecessary intermediate variables and helper functions when
using slices.Contains.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-12-16 13:31:33 +01:00
Sebastiaan van Stijn
ea116d0907 Merge pull request #51733 from vvoland/restore-installers
hack: Restore rootlesskit and tini installers
2025-12-16 13:30:29 +01:00
Paweł Gronowski
8802be9eca hack: Restore rootlesskit and tini installers
Revert a part of 9e72c44dae

These are still used by packaging scripts.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-12-16 12:58:22 +01:00
Paweł Gronowski
fab17fc011 Merge pull request #51716 from vvoland/gha-work
gha: Bump actions/upload-artifact to v6
2025-12-16 11:29:24 +00:00
Rob Murray
25fbe6cd43 Merge pull request #51725 from robmry/max-api-1.53
Update client MaxAPIVersion to 1.53
2025-12-16 11:14:41 +00:00
Rob Murray
54a6ec374a Update client MaxAPIVersion to 1.53
The daemon's MaxAPIVersion was updated in commit f6b1488.

Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-12-16 11:03:58 +00:00
Rob Murray
1e209e788b Continue to backfill empty PortBindings in API 1.53
- introduced by commit 0ca7ac3 ("daemon: backfill empty PBs
  slices for backward compat")

Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-12-16 11:03:58 +00:00
Sebastiaan van Stijn
2cce7ff87f api/docs: move ImageHistoryResponseItem to definitions (API v1.25-v1.52)
Similar to caaa9c9bb5, but applied to
existing API versions, so that it's easier to compare differences
between versions.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-12-16 11:42:03 +01:00
Paweł Gronowski
b48be08eb5 project: Update branches/tags and patch releases
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-12-16 11:36:37 +01:00
Sebastiaan van Stijn
ec136d7ecc Merge pull request #51723 from vvoland/golangci-no-concurrency-limit
ci: Remove concurrency setting from golangci-lint config
2025-12-16 11:06:25 +01:00
Rob Murray
bdda339294 Merge pull request #51574 from 2003Aditya/TestAPINetworkInspectWithScope
migrate TestAPINetworkInspectWithScope to integration test
2025-12-15 20:53:15 +00:00
Paweł Gronowski
51d1974500 daemon/cluster/test: Use t.Context()
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-12-15 18:56:34 +01:00
Paweł Gronowski
6c5233e109 modernize: Use strings.CutSuffix
Added in Go 1.20

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-12-15 18:56:34 +01:00
Paweł Gronowski
71fd582aa2 modernize: Use strings.Builder instead of string concatenation
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-12-15 18:56:34 +01:00
Paweł Gronowski
62ed24a87c modernize: Use slices.Contains
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-12-15 18:56:34 +01:00
Paweł Gronowski
bce14ac5bc reflect: Use TypeFor instead of TypeOf
Added in Go 1.22

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-12-15 18:56:34 +01:00
Paweł Gronowski
3df05205f4 modernize: Use range int
Added in Go 1.22

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-12-15 18:56:34 +01:00
Paweł Gronowski
e548a31d28 modernize: Use min built-in
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-12-15 18:56:34 +01:00
Paweł Gronowski
39c19d9161 modernize: Use fmt.Appendf
Added in Go 1.19

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-12-15 18:56:33 +01:00
Paweł Gronowski
cdce8f4f92 modernize: Use maps.Copy instead of for loops
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-12-15 18:56:33 +01:00
Paweł Gronowski
ff33808a79 modernize: Use strings.Cut instead of strings.Index where possible
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-12-15 18:56:33 +01:00
Paweł Gronowski
a25907b485 modernize: Prefer strings.SplitSeq instead of Split
Avoids extra allocations. Added in Go 1.24.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-12-15 18:56:33 +01:00
Paweł Gronowski
c9b0a21bb1 modernize: Use b.Loop (introduced in Go 1.24)
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-12-15 18:56:33 +01:00
Paweł Gronowski
37fdb6d775 ci: Remove concurrency setting from golangci-lint config
Remove the hardcoded concurrency limit of 2 from the golangci-lint
configuration to allow the linter to match the machine CPU's core count.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-12-15 18:55:32 +01:00
Rob Murray
239a49d403 Merge pull request #51711 from robmry/nri-config-reload
NRI: config reload
2025-12-15 17:51:27 +00:00
Paweł Gronowski
f44b5abf0e api: deprecate /grpc and /session endpoints
The /grpc and /session endpoints are now deprecated as the Engine has
been upgraded to properly support HTTP/2 and h2c requests, making these
specialized endpoints unnecessary.

These endpoints will be removed in the next major API version to
complete the cleanup.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-12-15 18:44:22 +01:00
Paweł Gronowski
5b60725eed Merge pull request #51719 from vvoland/api-uncut
api: remove docs/v1.53.yaml
2025-12-15 17:14:44 +00:00
Paweł Gronowski
a0bd623959 api: remove docs/v1.53.yaml
The API is not cut yet

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-12-15 17:24:53 +01:00
Rob Murray
425f23995d Merge pull request #51712 from robmry/nri-error-on-unsupported-adjustment
NRI: error on unsupported adjustment
2025-12-15 16:21:31 +00:00
Brian Goff
2ec5bdfaf6 Merge pull request #51666 from ndeloof/swagger
simplify swagger generation
2025-12-15 08:13:20 -08:00
Paweł Gronowski
82c35087d0 Merge pull request #51717 from vvoland/c8d-errs-log
daemon/c8d: Log correct error extractOCIErrors
2025-12-15 16:12:37 +00:00
Rob Murray
248d33664e Merge pull request #51713 from robmry/nri-info
NRI: report config in "docker info"
2025-12-15 15:44:56 +00:00
Paweł Gronowski
53c67be034 daemon/c8d: Log correct error extractOCIErrors
When logging an unmarshal failure in the registry error handling code,
the function was incorrectly logging the uninitialized `derrs` variable
instead of the actual JSON unmarshal error `jerr`.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-12-15 15:56:44 +01:00
Rob Murray
98d196b714 NRI: error on unsupported adjustment
Also error on eviction requests.

Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-12-15 14:08:02 +00:00
Rob Murray
ff553c5069 NRI: make config reloadable
Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-12-15 13:59:09 +00:00
Paweł Gronowski
3f938c6091 gha: Bump actions/upload-artifact to v6
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-12-15 14:00:06 +01:00