Browse code

Merge pull request #51109 from thaJeztah/deprecate_plugin_dockerversion

api/types/plugin: deprecate Config.DockerVersion field

Sebastiaan van Stijn authored on 2025/10/06 23:35:09
Showing 7 changed files
... ...
@@ -74,6 +74,9 @@ keywords: "API, Docker, rcli, REST, documentation"
74 74
   continues returning these fields when set for informational purposes, but
75 75
   they should not be depended on as they will be omitted once the legacy builder
76 76
   is removed.
77
+* Deprecated: the `Config.DockerVersion` field returned by the `GET /plugins`
78
+  and `GET /images/{name}/json` endpoints is deprecated. The field is no
79
+  longer set, and is omitted when empty.
77 80
 
78 81
 ## v1.50 API changes
79 82
 
... ...
@@ -3142,10 +3142,15 @@ definitions:
3142 3142
           - Args
3143 3143
         properties:
3144 3144
           DockerVersion:
3145
-            description: "Docker Version used to create the plugin"
3145
+            description: |-
3146
+              Docker Version used to create the plugin.
3147
+
3148
+              Depending on how the plugin was created, this field may be empty or omitted.
3149
+
3150
+              Deprecated: this field is no longer set, and will be removed in the next API version.
3146 3151
             type: "string"
3147 3152
             x-nullable: false
3148
-            example: "17.06.0-ce"
3153
+            x-omitempty: true
3149 3154
           Description:
3150 3155
             type: "string"
3151 3156
             x-nullable: false
... ...
@@ -3203,10 +3203,15 @@ definitions:
3203 3203
           - Args
3204 3204
         properties:
3205 3205
           DockerVersion:
3206
-            description: "Docker Version used to create the plugin"
3206
+            description: |-
3207
+              Docker Version used to create the plugin.
3208
+
3209
+              Depending on how the plugin was created, this field may be empty or omitted.
3210
+
3211
+              Deprecated: this field is no longer set, and will be removed in the next API version.
3207 3212
             type: "string"
3208 3213
             x-nullable: false
3209
-            example: "17.06.0-ce"
3214
+            x-omitempty: true
3210 3215
           Description:
3211 3216
             type: "string"
3212 3217
             x-nullable: false
... ...
@@ -3203,10 +3203,15 @@ definitions:
3203 3203
           - Args
3204 3204
         properties:
3205 3205
           DockerVersion:
3206
-            description: "Docker Version used to create the plugin"
3206
+            description: |-
3207
+              Docker Version used to create the plugin.
3208
+
3209
+              Depending on how the plugin was created, this field may be empty or omitted.
3210
+
3211
+              Deprecated: this field is no longer set, and will be removed in the next API version.
3207 3212
             type: "string"
3208 3213
             x-nullable: false
3209
-            example: "17.06.0-ce"
3214
+            x-omitempty: true
3210 3215
           Description:
3211 3216
             type: "string"
3212 3217
             x-nullable: false
... ...
@@ -51,8 +51,11 @@ type Config struct {
51 51
 	// Required: true
52 52
 	Description string `json:"Description"`
53 53
 
54
-	// Docker Version used to create the plugin
55
-	// Example: 17.06.0-ce
54
+	// Docker Version used to create the plugin.
55
+	//
56
+	// Depending on how the plugin was created, this field may be empty or omitted.
57
+	//
58
+	// Deprecated: this field is no longer set, and will be removed in the next API version.
56 59
 	DockerVersion string `json:"DockerVersion,omitempty"`
57 60
 
58 61
 	// documentation
... ...
@@ -707,7 +707,7 @@ func (pm *Manager) CreateFromContext(ctx context.Context, tarCtx io.ReadCloser,
707 707
 		DiffIds: []string{rootFSBlob.Digest().String()},
708 708
 	}
709 709
 
710
-	config.DockerVersion = dockerversion.Version
710
+	config.DockerVersion = dockerversion.Version //nolint:staticcheck // ignore SA1019: field is deprecated.
711 711
 
712 712
 	configBlob, err := pm.blobStore.Writer(ctx, content.WithRef(name+"-config.json"))
713 713
 	if err != nil {
... ...
@@ -51,8 +51,11 @@ type Config struct {
51 51
 	// Required: true
52 52
 	Description string `json:"Description"`
53 53
 
54
-	// Docker Version used to create the plugin
55
-	// Example: 17.06.0-ce
54
+	// Docker Version used to create the plugin.
55
+	//
56
+	// Depending on how the plugin was created, this field may be empty or omitted.
57
+	//
58
+	// Deprecated: this field is no longer set, and will be removed in the next API version.
56 59
 	DockerVersion string `json:"DockerVersion,omitempty"`
57 60
 
58 61
 	// documentation