Skip to content

Commit

Permalink
remove "Experimental" client field from "docker version"
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
thaJeztah committed Apr 7, 2022
1 parent 51aa683 commit a5a339b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
2 changes: 0 additions & 2 deletions cli/command/system/testdata/docker-client-version.golden
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -16,7 +15,6 @@ Server: Docker Enterprise Edition (EE) 2.0
Git commit: 64ddfa6
Built: Mon Jul 9 23:38:38 2018
OS/Arch: linux/amd64
Experimental: false
Universal Control Plane:
Version: 17.06.2-ee-15
ApiVersion: 1.30
Expand Down
3 changes: 0 additions & 3 deletions cli/command/system/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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(),
},
}
Expand Down
1 change: 0 additions & 1 deletion cli/command/system/version_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{},
}
Expand Down
4 changes: 4 additions & 0 deletions docs/deprecated.md
Original file line number Diff line number Diff line change
Expand Up @@ -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**
Expand Down

0 comments on commit a5a339b

Please sign in to comment.