Merge pull request #51109 from thaJeztah/deprecate_plugin_dockerversion

api/types/plugin: deprecate Config.DockerVersion field
This commit is contained in:
Sebastiaan van Stijn
2025-10-06 16:35:09 +02:00
committed by GitHub
7 changed files with 35 additions and 11 deletions

View File

@@ -74,6 +74,9 @@ keywords: "API, Docker, rcli, REST, documentation"
continues returning these fields when set for informational purposes, but 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 they should not be depended on as they will be omitted once the legacy builder
is removed. 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 ## v1.50 API changes

View File

@@ -3142,10 +3142,15 @@ definitions:
- Args - Args
properties: properties:
DockerVersion: 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" type: "string"
x-nullable: false x-nullable: false
example: "17.06.0-ce" x-omitempty: true
Description: Description:
type: "string" type: "string"
x-nullable: false x-nullable: false

View File

@@ -3203,10 +3203,15 @@ definitions:
- Args - Args
properties: properties:
DockerVersion: 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" type: "string"
x-nullable: false x-nullable: false
example: "17.06.0-ce" x-omitempty: true
Description: Description:
type: "string" type: "string"
x-nullable: false x-nullable: false

View File

@@ -3203,10 +3203,15 @@ definitions:
- Args - Args
properties: properties:
DockerVersion: 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" type: "string"
x-nullable: false x-nullable: false
example: "17.06.0-ce" x-omitempty: true
Description: Description:
type: "string" type: "string"
x-nullable: false x-nullable: false

View File

@@ -51,8 +51,11 @@ type Config struct {
// Required: true // Required: true
Description string `json:"Description"` Description string `json:"Description"`
// Docker Version used to create the plugin // Docker Version used to create the plugin.
// Example: 17.06.0-ce //
// 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"` DockerVersion string `json:"DockerVersion,omitempty"`
// documentation // documentation

View File

@@ -707,7 +707,7 @@ func (pm *Manager) CreateFromContext(ctx context.Context, tarCtx io.ReadCloser,
DiffIds: []string{rootFSBlob.Digest().String()}, 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")) configBlob, err := pm.blobStore.Writer(ctx, content.WithRef(name+"-config.json"))
if err != nil { if err != nil {

View File

@@ -51,8 +51,11 @@ type Config struct {
// Required: true // Required: true
Description string `json:"Description"` Description string `json:"Description"`
// Docker Version used to create the plugin // Docker Version used to create the plugin.
// Example: 17.06.0-ce //
// 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"` DockerVersion string `json:"DockerVersion,omitempty"`
// documentation // documentation