Skip to content

Commit e4d792a

Browse files
committed
api/types/system: remove Info.ExecutionDriver
The execution-driver was replaced with containerd since docker 1.11 (API v1.23) in 9c4570a, after which the value was no longer set. The field was left in the type definition. Commit 1fb1136 removed its use from the CLI and [docker-archive-public/docker.engine-api@39c7d7e] removed it from the API type, followed by an update to the API docs in 3c6ef4c. Changes to the API types were not pulled into the engine until v1.13, and probably because of that gated it on API version < 1.25 instead of < 1.24 (see 6d98e34); setting a "not supported" value for older versions. Based on the above; this field was deprecated in API v1.23, and empty since then. Given that the minimum API version supported by the engine is not v1.24, we can safely remove it. [docker-archive-public/docker.engine-api@39c7d7e]: docker-archive-public/docker.engine-api@39c7d7e Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent f3d377e commit e4d792a

3 files changed

Lines changed: 0 additions & 28 deletions

File tree

api/server/router/system/system_routes.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ func (s *systemRouter) getInfo(ctx context.Context, w http.ResponseWriter, r *ht
8181
nameOnly = append(nameOnly, so.Name)
8282
}
8383
info.SecurityOptions = nameOnly
84-
info.ExecutionDriver = "<not supported>" //nolint:staticcheck // ignore SA1019 (ExecutionDriver is deprecated)
8584
}
8685
if versions.LessThan(version, "1.39") {
8786
if info.KernelVersion == "" {

api/types/system/info.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,6 @@ type Info struct {
7777

7878
Containerd *ContainerdInfo `json:",omitempty"`
7979

80-
// Legacy API fields for older API versions.
81-
legacyFields
82-
8380
// Warnings contains a slice of warnings that occurred while collecting
8481
// system information. These warnings are intended to be informational
8582
// messages for the user, and are not intended to be parsed / used for
@@ -124,10 +121,6 @@ type ContainerdNamespaces struct {
124121
Plugins string
125122
}
126123

127-
type legacyFields struct {
128-
ExecutionDriver string `json:",omitempty"` // Deprecated: deprecated since API v1.25, but returned for older versions.
129-
}
130-
131124
// PluginsInfo is a temp struct holding Plugins name
132125
// registered with docker daemon. It is used by [Info] struct
133126
type PluginsInfo struct {

integration/system/info_linux_test.go

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,8 @@
33
package system // import "github.com/docker/docker/integration/system"
44

55
import (
6-
"net/http"
76
"testing"
87

9-
"github.com/docker/docker/testutil"
10-
req "github.com/docker/docker/testutil/request"
118
"gotest.tools/v3/assert"
129
is "gotest.tools/v3/assert/cmp"
1310
)
@@ -28,20 +25,3 @@ func TestInfoBinaryCommits(t *testing.T) {
2825
assert.Check(t, "N/A" != info.RuncCommit.ID)
2926
assert.Check(t, is.Equal(info.RuncCommit.Expected, info.RuncCommit.ID))
3027
}
31-
32-
func TestInfoAPIVersioned(t *testing.T) {
33-
ctx := testutil.StartSpan(baseContext, t)
34-
35-
res, body, err := req.Get(ctx, "/v1.24/info")
36-
assert.NilError(t, err)
37-
assert.Check(t, is.DeepEqual(res.StatusCode, http.StatusOK))
38-
39-
b, err := req.ReadBody(body)
40-
assert.NilError(t, err)
41-
42-
// Verify the old response on API 1.24 and older before commit
43-
// 6d98e344c7702a8a713cb9e02a19d83a79d3f930.
44-
out := string(b)
45-
assert.Check(t, is.Contains(out, "ExecutionDriver"))
46-
assert.Check(t, is.Contains(out, "not supported"))
47-
}

0 commit comments

Comments
 (0)