diff --git a/api/docs/CHANGELOG.md b/api/docs/CHANGELOG.md index 3e5367b20d..24ac43c57b 100644 --- a/api/docs/CHANGELOG.md +++ b/api/docs/CHANGELOG.md @@ -74,6 +74,9 @@ keywords: "API, Docker, rcli, REST, documentation" continues returning these fields when set for informational purposes, but they should not be depended on as they will be omitted once the legacy builder is removed. +* Deprecated: the `Config.DockerVersion` field returned by the `GET /plugins` + and `GET /images/{name}/json` endpoints is deprecated. The field is no + longer set, and is omitted when empty. ## v1.50 API changes diff --git a/api/docs/v1.51.yaml b/api/docs/v1.51.yaml index a8d4cdaad9..b27758998c 100644 --- a/api/docs/v1.51.yaml +++ b/api/docs/v1.51.yaml @@ -3142,10 +3142,15 @@ definitions: - Args properties: DockerVersion: - description: "Docker Version used to create the plugin" + description: |- + Docker Version used to create the plugin. + + Depending on how the plugin was created, this field may be empty or omitted. + + Deprecated: this field is no longer set, and will be removed in the next API version. type: "string" x-nullable: false - example: "17.06.0-ce" + x-omitempty: true Description: type: "string" x-nullable: false diff --git a/api/docs/v1.52.yaml b/api/docs/v1.52.yaml index 7923f9f194..70df91a10f 100644 --- a/api/docs/v1.52.yaml +++ b/api/docs/v1.52.yaml @@ -3203,10 +3203,15 @@ definitions: - Args properties: DockerVersion: - description: "Docker Version used to create the plugin" + description: |- + Docker Version used to create the plugin. + + Depending on how the plugin was created, this field may be empty or omitted. + + Deprecated: this field is no longer set, and will be removed in the next API version. type: "string" x-nullable: false - example: "17.06.0-ce" + x-omitempty: true Description: type: "string" x-nullable: false diff --git a/api/swagger.yaml b/api/swagger.yaml index 7923f9f194..70df91a10f 100644 --- a/api/swagger.yaml +++ b/api/swagger.yaml @@ -3203,10 +3203,15 @@ definitions: - Args properties: DockerVersion: - description: "Docker Version used to create the plugin" + description: |- + Docker Version used to create the plugin. + + Depending on how the plugin was created, this field may be empty or omitted. + + Deprecated: this field is no longer set, and will be removed in the next API version. type: "string" x-nullable: false - example: "17.06.0-ce" + x-omitempty: true Description: type: "string" x-nullable: false diff --git a/api/types/plugin/plugin.go b/api/types/plugin/plugin.go index b7c768d7fc..e1adda6292 100644 --- a/api/types/plugin/plugin.go +++ b/api/types/plugin/plugin.go @@ -51,8 +51,11 @@ type Config struct { // Required: true Description string `json:"Description"` - // Docker Version used to create the plugin - // Example: 17.06.0-ce + // Docker Version used to create the plugin. + // + // Depending on how the plugin was created, this field may be empty or omitted. + // + // Deprecated: this field is no longer set, and will be removed in the next API version. DockerVersion string `json:"DockerVersion,omitempty"` // documentation diff --git a/daemon/pkg/plugin/backend_linux.go b/daemon/pkg/plugin/backend_linux.go index 9775c7dabc..148a723f1a 100644 --- a/daemon/pkg/plugin/backend_linux.go +++ b/daemon/pkg/plugin/backend_linux.go @@ -707,7 +707,7 @@ func (pm *Manager) CreateFromContext(ctx context.Context, tarCtx io.ReadCloser, DiffIds: []string{rootFSBlob.Digest().String()}, } - config.DockerVersion = dockerversion.Version + config.DockerVersion = dockerversion.Version //nolint:staticcheck // ignore SA1019: field is deprecated. configBlob, err := pm.blobStore.Writer(ctx, content.WithRef(name+"-config.json")) if err != nil { diff --git a/vendor/github.com/moby/moby/api/types/plugin/plugin.go b/vendor/github.com/moby/moby/api/types/plugin/plugin.go index b7c768d7fc..e1adda6292 100644 --- a/vendor/github.com/moby/moby/api/types/plugin/plugin.go +++ b/vendor/github.com/moby/moby/api/types/plugin/plugin.go @@ -51,8 +51,11 @@ type Config struct { // Required: true Description string `json:"Description"` - // Docker Version used to create the plugin - // Example: 17.06.0-ce + // Docker Version used to create the plugin. + // + // Depending on how the plugin was created, this field may be empty or omitted. + // + // Deprecated: this field is no longer set, and will be removed in the next API version. DockerVersion string `json:"DockerVersion,omitempty"` // documentation