From bbc95c7bb7e3fe5c76a9112d7ee7b8a76352e167 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Thu, 7 Apr 2022 22:14:25 +0200 Subject: [PATCH] remove "Experimental" client field from "docker version" Configuration (enabling/disabling) of Experimental client features was deprecated in Docker 19.03, and removed in 20.10. Experimental CLI features are now always enabled. In Docker 20.10, the Experimental field in `docker version` was kept (but always true). This patch removes the field from the output (both "pretty" output and the JSON struct). Signed-off-by: Sebastiaan van Stijn --- cli/command/system/testdata/docker-client-version.golden | 1 - cli/command/system/version.go | 3 --- cli/command/system/version_test.go | 1 - docs/deprecated.md | 4 ++++ 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/cli/command/system/testdata/docker-client-version.golden b/cli/command/system/testdata/docker-client-version.golden index faed505505..6b5c331da6 100644 --- a/cli/command/system/testdata/docker-client-version.golden +++ b/cli/command/system/testdata/docker-client-version.golden @@ -6,7 +6,6 @@ Client: Built: Wed May 30 22:21:05 2018 OS/Arch: linux/amd64 Context: my-context - Experimental: true Server: Docker Enterprise Edition (EE) 2.0 Engine: diff --git a/cli/command/system/version.go b/cli/command/system/version.go index 06b62ae763..2f36a06dcc 100644 --- a/cli/command/system/version.go +++ b/cli/command/system/version.go @@ -28,7 +28,6 @@ Client:{{if ne .Platform.Name ""}} {{.Platform.Name}}{{end}} Built: {{.BuildTime}} OS/Arch: {{.Os}}/{{.Arch}} Context: {{.Context}} - Experimental: {{.Experimental}} {{- end}} {{- if .ServerOK}}{{with .Server}} @@ -76,7 +75,6 @@ type clientVersion struct { Arch string BuildTime string `json:",omitempty"` Context string - Experimental bool `json:",omitempty"` // Deprecated: experimental CLI features always enabled. This field is kept for backward-compatibility, and is always "true" } // ServerOK returns true when the client could connect to the docker server @@ -140,7 +138,6 @@ func runVersion(dockerCli command.Cli, opts *versionOptions) error { BuildTime: reformatDate(version.BuildTime), Os: runtime.GOOS, Arch: arch(), - Experimental: true, Context: dockerCli.CurrentContext(), }, } diff --git a/cli/command/system/version_test.go b/cli/command/system/version_test.go index 2581bd4de1..3ddf643290 100644 --- a/cli/command/system/version_test.go +++ b/cli/command/system/version_test.go @@ -42,7 +42,6 @@ func TestVersionAlign(t *testing.T) { Arch: "amd64", BuildTime: "Wed May 30 22:21:05 2018", Context: "my-context", - Experimental: true, }, Server: &types.Version{}, } diff --git a/docs/deprecated.md b/docs/deprecated.md index b09d2426d0..f40b76562f 100644 --- a/docs/deprecated.md +++ b/docs/deprecated.md @@ -344,6 +344,10 @@ The `DOCKER_CLI_EXPERIMENTAL` environment variable and the corresponding `experi field in the CLI configuration file are deprecated. Experimental features are enabled by default, and these configuration options are no longer functional. +Starting with v22.04, the Docker CLI no longer prints `Experimental` for the client +in the output of `docker version`, and the field has been removed from the JSON +format. + ### CLI plugins support **Deprecated in Release: v20.10**