Skip to content

Commit

Permalink
Merge pull request moby#48111 from thaJeztah/rm_deprecated_executiond…
Browse files Browse the repository at this point in the history
…river

api/types/system: remove deprecated Info.ExecutionDriver
  • Loading branch information
AkihiroSuda authored Jul 2, 2024
2 parents 7083f1f + e4d792a commit a045f9e
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 28 deletions.
1 change: 0 additions & 1 deletion api/server/router/system/system_routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ func (s *systemRouter) getInfo(ctx context.Context, w http.ResponseWriter, r *ht
nameOnly = append(nameOnly, so.Name)
}
info.SecurityOptions = nameOnly
info.ExecutionDriver = "<not supported>" //nolint:staticcheck // ignore SA1019 (ExecutionDriver is deprecated)
}
if versions.LessThan(version, "1.39") {
if info.KernelVersion == "" {
Expand Down
7 changes: 0 additions & 7 deletions api/types/system/info.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,6 @@ type Info struct {

Containerd *ContainerdInfo `json:",omitempty"`

// Legacy API fields for older API versions.
legacyFields

// Warnings contains a slice of warnings that occurred while collecting
// system information. These warnings are intended to be informational
// messages for the user, and are not intended to be parsed / used for
Expand Down Expand Up @@ -124,10 +121,6 @@ type ContainerdNamespaces struct {
Plugins string
}

type legacyFields struct {
ExecutionDriver string `json:",omitempty"` // Deprecated: deprecated since API v1.25, but returned for older versions.
}

// PluginsInfo is a temp struct holding Plugins name
// registered with docker daemon. It is used by [Info] struct
type PluginsInfo struct {
Expand Down
20 changes: 0 additions & 20 deletions integration/system/info_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,8 @@
package system // import "github.com/docker/docker/integration/system"

import (
"net/http"
"testing"

"github.com/docker/docker/testutil"
req "github.com/docker/docker/testutil/request"
"gotest.tools/v3/assert"
is "gotest.tools/v3/assert/cmp"
)
Expand All @@ -28,20 +25,3 @@ func TestInfoBinaryCommits(t *testing.T) {
assert.Check(t, "N/A" != info.RuncCommit.ID)
assert.Check(t, is.Equal(info.RuncCommit.Expected, info.RuncCommit.ID))
}

func TestInfoAPIVersioned(t *testing.T) {
ctx := testutil.StartSpan(baseContext, t)

res, body, err := req.Get(ctx, "/v1.24/info")
assert.NilError(t, err)
assert.Check(t, is.DeepEqual(res.StatusCode, http.StatusOK))

b, err := req.ReadBody(body)
assert.NilError(t, err)

// Verify the old response on API 1.24 and older before commit
// 6d98e344c7702a8a713cb9e02a19d83a79d3f930.
out := string(b)
assert.Check(t, is.Contains(out, "ExecutionDriver"))
assert.Check(t, is.Contains(out, "not supported"))
}

0 comments on commit a045f9e

Please sign in to comment.