Skip to content

Commit ac4c4df

Browse files
committed
Merge tag 'v29.4.0' into 29.x
v29.4.0
2 parents 1245054 + 9d7ad9f commit ac4c4df

336 files changed

Lines changed: 10121 additions & 2127 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/codeql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
name: Update Go
6464
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6
6565
with:
66-
go-version: "1.25.8"
66+
go-version: "1.26.1"
6767
cache: false
6868
-
6969
name: Initialize CodeQL

.github/workflows/e2e.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
TESTFLAGS: -coverprofile=/tmp/coverage/coverage.txt
7575
-
7676
name: Send to Codecov
77-
uses: codecov/codecov-action@1af58845a975a7985b0beb0cbe6fbbb71a41dbad # v5
77+
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v5
7878
with:
7979
files: ./build/coverage/coverage.txt
8080
token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
targets: test-coverage
3939
-
4040
name: Send to Codecov
41-
uses: codecov/codecov-action@1af58845a975a7985b0beb0cbe6fbbb71a41dbad # v5
41+
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v5
4242
with:
4343
files: ./build/coverage/coverage.txt
4444
token: ${{ secrets.CODECOV_TOKEN }}
@@ -67,7 +67,7 @@ jobs:
6767
name: Set up Go
6868
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6
6969
with:
70-
go-version: "1.25.8"
70+
go-version: "1.26.1"
7171
cache: false
7272
-
7373
name: Test
@@ -81,7 +81,7 @@ jobs:
8181
shell: bash
8282
-
8383
name: Send to Codecov
84-
uses: codecov/codecov-action@1af58845a975a7985b0beb0cbe6fbbb71a41dbad # v5
84+
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v5
8585
with:
8686
files: /tmp/coverage.txt
8787
working-directory: ${{ env.GOPATH }}/src/github.com/docker/cli

.github/workflows/validate.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,27 @@ jobs:
8080
shell: 'script --return --quiet --command "bash {0}"'
8181
run: |
8282
make -f docker.Makefile ${{ matrix.target }}
83+
84+
validate-gocompat:
85+
runs-on: ubuntu-24.04
86+
env:
87+
GOPATH: ${{ github.workspace }}
88+
GO111MODULE: off
89+
steps:
90+
-
91+
name: Checkout
92+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
93+
with:
94+
path: src/github.com/docker/cli
95+
-
96+
name: Set up Go
97+
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6
98+
with:
99+
go-version: "1.26.1"
100+
cache: false
101+
-
102+
name: Run gocompat check
103+
shell: 'script --return --quiet --command "bash {0}"'
104+
working-directory: ${{ github.workspace }}/src/github.com/docker/cli
105+
run: |
106+
make -C ./internal/gocompat verify

.golangci.yml

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ run:
55
# which causes it to fallback to go1.17 semantics.
66
#
77
# TODO(thaJeztah): update "usetesting" settings to enable go1.24 features once our minimum version is go1.24
8-
go: "1.25.8"
8+
go: "1.26.1"
99

1010
timeout: 5m
1111

@@ -158,11 +158,6 @@ linters:
158158
- name: use-any # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#use-any
159159
- name: use-errors-new # https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#use-errors-new
160160

161-
usetesting:
162-
os-chdir: false # FIXME(thaJeztah): Disable `os.Chdir()` detections; should be automatically disabled on Go < 1.24; see https://github.com/docker/cli/pull/5835#issuecomment-2665302478
163-
context-background: false # FIXME(thaJeztah): Disable `context.Background()` detections; should be automatically disabled on Go < 1.24; see https://github.com/docker/cli/pull/5835#issuecomment-2665302478
164-
context-todo: false # FIXME(thaJeztah): Disable `context.TODO()` detections; should be automatically disabled on Go < 1.24; see https://github.com/docker/cli/pull/5835#issuecomment-2665302478
165-
166161
exclusions:
167162
# We prefer to use an "linters.exclusions.rules" so that new "default" exclusions are not
168163
# automatically inherited. We can decide whether or not to follow upstream
@@ -225,13 +220,10 @@ linters:
225220
linters:
226221
- staticcheck
227222

228-
# Ignore deprecation linting for cli/command/stack/*.
229-
#
230-
# FIXME(thaJeztah): remove exception once these functions are un-exported or internal; see https://github.com/docker/cli/pull/6389
231-
- text: '^(SA1019): '
232-
path: "cli/command/stack"
223+
# TODO(thaJeztah): remove once https://github.com/leighmcculloch/gocheckcompilerdirectives/issues/7 is fixed.
224+
- text: "compiler directive unrecognized: //go:fix"
233225
linters:
234-
- staticcheck
226+
- gocheckcompilerdirectives
235227

236228
# Log a warning if an exclusion rule is unused.
237229
# Default: false

.mailmap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,7 @@ Lorenzo Fontana <lo@linux.com> <fontanalorenzo@me.com>
354354
Louis Opter <kalessin@kalessin.fr>
355355
Louis Opter <kalessin@kalessin.fr> <louis@dotcloud.com>
356356
Lovekesh Kumar <lovekesh.kumar@rtcamp.com>
357+
Luo Jiyin <luojiyin@hotmail.com>
357358
Luca Favatella <luca.favatella@erlang-solutions.com> <lucafavatella@users.noreply.github.com>
358359
Luke Marsden <me@lukemarsden.net> <luke@digital-crocus.com>
359360
Lyn <energylyn@zju.edu.cn>

AUTHORS

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# This file lists all contributors to the repository.
33
# See scripts/docs/generate-authors.sh to make modifications.
44

5+
4RH1T3CT0R7 <iprintercanon@gmail.com>
56
A. Lester Buck III <github-reg@nbolt.com>
67
Aanand Prasad <aanand.prasad@gmail.com>
78
Aaron L. Xu <liker.xu@foxmail.com>
@@ -42,6 +43,7 @@ Alexander Larsson <alexl@redhat.com>
4243
Alexander Morozov <lk4d4math@gmail.com>
4344
Alexander Ryabov <i@sepa.spb.ru>
4445
Alexandre González <agonzalezro@gmail.com>
46+
Alexandre Vallières-Lagacé <alexandre.valliereslagace@docker.com>
4547
Alexey Igrychev <alexey.igrychev@flant.com>
4648
Alexis Couvreur <alexiscouvreur.pro@gmail.com>
4749
Alfred Landrum <alfred.landrum@docker.com>
@@ -64,6 +66,7 @@ Andres G. Aragoneses <knocte@gmail.com>
6466
Andres Leon Rangel <aleon1220@gmail.com>
6567
Andrew France <andrew@avito.co.uk>
6668
Andrew He <he.andrew.mail@gmail.com>
69+
Andrew Hopp <andrew.hopp@me.com>
6770
Andrew Hsu <andrewhsu@docker.com>
6871
Andrew Macpherson <hopscotch23@gmail.com>
6972
Andrew McDonnell <bugs@andrewmcdonnell.net>
@@ -127,6 +130,7 @@ Brian Goff <cpuguy83@gmail.com>
127130
Brian Tracy <brian.tracy33@gmail.com>
128131
Brian Wieder <brian@4wieders.com>
129132
Bruno Sousa <bruno.sousa@docker.com>
133+
Bruno Verachten <gounthar@gmail.com>
130134
Bryan Bess <squarejaw@bsbess.com>
131135
Bryan Boreham <bjboreham@gmail.com>
132136
Bryan Murphy <bmurphy1976@gmail.com>
@@ -178,6 +182,7 @@ Christopher Svensson <stoffus@stoffus.com>
178182
Christy Norman <christy@linux.vnet.ibm.com>
179183
Chun Chen <ramichen@tencent.com>
180184
Clinton Kitson <clintonskitson@gmail.com>
185+
Codex <codex@openai.com>
181186
Coenraad Loubser <coenraad@wish.org.za>
182187
Colin Hebert <hebert.colin@gmail.com>
183188
Collin Guarino <collin.guarino@gmail.com>
@@ -234,13 +239,15 @@ David Sheets <dsheets@docker.com>
234239
David Williamson <david.williamson@docker.com>
235240
David Xia <dxia@spotify.com>
236241
David Young <yangboh@cn.ibm.com>
242+
Davlat Davydov <literally_user@hotmail.com>
237243
Deng Guangxing <dengguangxing@huawei.com>
238244
Denis Defreyne <denis@soundcloud.com>
239245
Denis Gladkikh <denis@gladkikh.email>
240246
Denis Ollier <larchunix@users.noreply.github.com>
241247
Dennis Docter <dennis@d23.nl>
242248
dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
243249
Derek McGowan <derek@mcg.dev>
250+
Derek Misler <derek.misler@docker.com>
244251
Des Preston <despreston@gmail.com>
245252
Deshi Xiao <dxiao@redhat.com>
246253
Dharmit Shah <shahdharmit@gmail.com>
@@ -260,6 +267,7 @@ Dominik Braun <dominik.braun@nbsp.de>
260267
Don Kjer <don.kjer@gmail.com>
261268
Dong Chen <dongluo.chen@docker.com>
262269
DongGeon Lee <secmatth1996@gmail.com>
270+
Dorin Geman <dorin.geman@docker.com>
263271
Doug Davis <dug@us.ibm.com>
264272
Drew Erny <derny@mirantis.com>
265273
Ed Costello <epc@epcostello.com>
@@ -358,7 +366,7 @@ Hugo Gabriel Eyherabide <hugogabriel.eyherabide@gmail.com>
358366
huqun <huqun@zju.edu.cn>
359367
Huu Nguyen <huu@prismskylabs.com>
360368
Hyzhou Zhy <hyzhou.zhy@alibaba-inc.com>
361-
Iain MacDonald <IJMacD@gmail.com>
369+
Iain MacDonald <ijmacd@gmail.com>
362370
Iain Samuel McLean Elder <iain@isme.es>
363371
Ian Campbell <ian.campbell@docker.com>
364372
Ian Philpot <ian.philpot@microsoft.com>
@@ -471,6 +479,7 @@ Justyn Temme <justyntemme@gmail.com>
471479
Jyrki Puttonen <jyrkiput@gmail.com>
472480
Jérémie Drouet <jeremie.drouet@gmail.com>
473481
Jérôme Petazzoni <jerome.petazzoni@docker.com>
482+
Jörg Sommer <joerg@jo-so.de>
474483
Jörg Thalheim <joerg@higgsboson.tk>
475484
Kai Blin <kai@samba.org>
476485
Kai Qiang Wu (Kennan) <wkq5325@gmail.com>
@@ -539,10 +548,12 @@ Lovekesh Kumar <lovekesh.kumar@rtcamp.com>
539548
Luca Favatella <luca.favatella@erlang-solutions.com>
540549
Luca Marturana <lucamarturana@gmail.com>
541550
Lucas Chan <lucas-github@lucaschan.com>
551+
Ludovic Temgoua Abanda <abandaludovic500@gmail.com>
542552
Luis Henrique Mulinari <luis.mulinari@gmail.com>
543553
Luka Hartwig <mail@lukahartwig.de>
544554
Lukas Heeren <lukas-heeren@hotmail.com>
545555
Lukasz Zajaczkowski <Lukasz.Zajaczkowski@ts.fujitsu.com>
556+
Luo Jiyin <luojiyin@hotmail.com>
546557
Lydell Manganti <LydellManganti@users.noreply.github.com>
547558
Lénaïc Huard <lhuard@amadeus.com>
548559
Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
@@ -603,6 +614,7 @@ Michael Spetsiotis <michael_spets@hotmail.com>
603614
Michael Steinert <mike.steinert@gmail.com>
604615
Michael Tews <michael@tews.dev>
605616
Michael West <mwest@mdsol.com>
617+
Michael Zampani <michael.zampani@docker.com>
606618
Michal Minář <miminar@redhat.com>
607619
Michał Czeraszkiewicz <czerasz@gmail.com>
608620
Miguel Angel Alvarez Cabrerizo <doncicuto@gmail.com>
@@ -617,6 +629,7 @@ Mike Goelzer <mike.goelzer@docker.com>
617629
Mike MacCana <mike.maccana@gmail.com>
618630
mikelinjie <294893458@qq.com>
619631
Mikhail Vasin <vasin@cloud-tv.ru>
632+
Milas Bowman <milas.bowman@docker.com>
620633
Milind Chawre <milindchawre@gmail.com>
621634
Mindaugas Rukas <momomg@gmail.com>
622635
Miroslav Gula <miroslav.gula@naytrolabs.com>
@@ -887,6 +900,7 @@ Vincent Batts <vbatts@redhat.com>
887900
Vincent Bernat <Vincent.Bernat@exoscale.ch>
888901
Vincent Demeester <vincent.demeester@docker.com>
889902
Vincent Woo <me@vincentwoo.com>
903+
Vineet Kumar <vineetkumar17112004@gmail.com>
890904
Vishnu Kannan <vishnuk@google.com>
891905
Vivek Goyal <vgoyal@redhat.com>
892906
Wang Jie <wangjie5@chinaskycloud.com>
@@ -916,6 +930,7 @@ Yanqiang Miao <miao.yanqiang@zte.com.cn>
916930
Yassine Tijani <yasstij11@gmail.com>
917931
Yi EungJun <eungjun.yi@navercorp.com>
918932
Ying Li <ying.li@docker.com>
933+
Yoan Wainmann <thebook90yw@gmail.com>
919934
Yong Tang <yong.tang.github@outlook.com>
920935
Yosef Fertel <yfertel@gmail.com>
921936
Yu Peng <yu.peng36@zte.com.cn>

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ARG BASE_VARIANT=alpine
88
ARG ALPINE_VERSION=3.23
99
ARG BASE_DEBIAN_DISTRO=bookworm
1010

11-
ARG GO_VERSION=1.25.8
11+
ARG GO_VERSION=1.26.1
1212

1313
# XX_VERSION specifies the version of the xx utility to use.
1414
# It must be a valid tag in the docker.io/tonistiigi/xx image repository.

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
29.0.0-dev
1+
29.4.0-dev

cli-plugins/hooks/hook_types.go

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
// FIXME(thaJeztah): remove once we are a module; the go:build directive prevents go from downgrading language version to go1.16:
2+
//go:build go1.25
3+
4+
// Package hooks defines the contract between the Docker CLI and CLI plugin hook
5+
// implementations.
6+
//
7+
// # Audience
8+
//
9+
// This package is intended to be imported by CLI plugin implementations that
10+
// implement a "hooks" subcommand, and by the Docker CLI when invoking those
11+
// hooks.
12+
//
13+
// # Contract and wire format
14+
//
15+
// Hook inputs (see [Request]) are serialized as JSON and passed to the plugin hook
16+
// subcommand (currently as a command-line argument). Hook outputs are emitted by
17+
// the plugin as JSON (see [Response]).
18+
//
19+
// # Stability
20+
//
21+
// The types that represent the hook contract ([Request], [Response] and related
22+
// constants) are considered part of Docker CLI's public Go API.
23+
// Fields and values may be extended in a backwards-compatible way (for example,
24+
// adding new fields), but existing fields and their meaning should remain stable.
25+
// Plugins should ignore unknown fields and unknown hook types to remain
26+
// forwards-compatible.
27+
package hooks
28+
29+
// ResponseType is the type of response from the plugin.
30+
type ResponseType int
31+
32+
const (
33+
NextSteps ResponseType = 0
34+
)
35+
36+
// Request is the type representing the information
37+
// that plugins declaring support for hooks get passed when
38+
// being invoked following a CLI command execution.
39+
type Request struct {
40+
// RootCmd is a string representing the matching hook configuration
41+
// which is currently being invoked. If a hook for "docker context"
42+
// is configured and the user executes "docker context ls", the plugin
43+
// is invoked with "context".
44+
RootCmd string `json:"RootCmd,omitzero"`
45+
46+
// Flags contains flags that were set on the command for which the
47+
// hook was invoked. It uses flag names as key, with leading hyphens
48+
// removed ("--flag" and "-flag" are included as "flag" and "f").
49+
//
50+
// Flag values are not included and are set to an empty string,
51+
// except for boolean flags known to the CLI itself, for which
52+
// the value is either "true", or "false".
53+
//
54+
// Plugins can use this information to adjust their [Response]
55+
// based on whether the command triggering the hook was invoked
56+
// with.
57+
Flags map[string]string `json:"Flags,omitzero"`
58+
59+
// CommandError is a string containing the error output (if any)
60+
// of the command for which the hook was invoked.
61+
CommandError string `json:"CommandError,omitzero"`
62+
}
63+
64+
// Response represents a plugin hook response. Plugins
65+
// declaring support for CLI hooks need to print a JSON
66+
// representation of this type when their hook subcommand
67+
// is invoked.
68+
type Response struct {
69+
Type ResponseType `json:"Type"`
70+
Template string `json:"Template,omitzero"`
71+
}
72+
73+
// HookType is the type of response from the plugin.
74+
//
75+
// Deprecated: use [ResponseType] instead.
76+
//
77+
//go:fix inline
78+
type HookType = ResponseType
79+
80+
// HookMessage represents a plugin hook response.
81+
//
82+
// Deprecated: use [Response] instead.
83+
//
84+
//go:fix inline
85+
type HookMessage = Response

0 commit comments

Comments
 (0)