mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
api/types/image: InspectResponse: deprecate Parent, DockerVersion
The image inspect response has various fields that were deprecated as part of the legacy builder, or Dockerfile syntax; - The `Parent` field is only used for the legacy builder, and only set for images that are built locally (i.e., not persisted when pulling an image). - The `DockerVersion` field is only set when building images with the legacy builder, and empty in most cases. This patch deprecates the fields in the `InspectResponse` go struct, as these fields will no longer be set in future once the legacy builder is removed (`Parent`, `DockerVersion`). The legacy builder's deprecation in [cli@4d8e457] / [cli@fd22746] (docker 23.0, API v1.42), however the related API fields were kept so that information of legacy images would not be discarded. The API continues to return these fields if set, allowing the client to print the fields for informational purposes when printing the raw response, but these fields should be considered "transitional", and not be depended on; deprecating the fields helps raise awareness. [cli@4d8e457]:4d8e45782b[cli@fd22746]:fd2274692fSigned-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@@ -68,6 +68,12 @@ keywords: "API, Docker, rcli, REST, documentation"
|
||||
in the next API version.
|
||||
* Deprecated: The field `KernelMemoryTCP` as part of `GET /info` is deprecated
|
||||
and will be removed in the next API version.
|
||||
* Deprecated: the `Parent` and `DockerVersion` fields returned by the
|
||||
`GET /images/{name}/json` endpoint are deprecated. These fields are set by
|
||||
the legacy builder, and are no longer set when using BuildKit. The API
|
||||
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.
|
||||
|
||||
## v1.50 API changes
|
||||
|
||||
|
||||
@@ -1938,6 +1938,11 @@ definitions:
|
||||
Depending on how the image was created, this field may be empty and
|
||||
is only set for images that were built/created locally. This field
|
||||
is empty if the image was pulled from an image registry.
|
||||
|
||||
> **Deprecated**: This field is only set when using the deprecated
|
||||
> legacy builder. It is included in API responses for informational
|
||||
> purposes, but should not be depended on as it will be omitted
|
||||
> once the legacy builder is removed.
|
||||
type: "string"
|
||||
x-nullable: false
|
||||
example: ""
|
||||
@@ -1963,6 +1968,11 @@ definitions:
|
||||
The version of Docker that was used to build the image.
|
||||
|
||||
Depending on how the image was created, this field may be empty.
|
||||
|
||||
> **Deprecated**: This field is only set when using the deprecated
|
||||
> legacy builder. It is included in API responses for informational
|
||||
> purposes, but should not be depended on as it will be omitted
|
||||
> once the legacy builder is removed.
|
||||
type: "string"
|
||||
x-nullable: false
|
||||
example: "27.0.1"
|
||||
|
||||
@@ -1838,6 +1838,11 @@ definitions:
|
||||
Depending on how the image was created, this field may be empty and
|
||||
is only set for images that were built/created locally. This field
|
||||
is empty if the image was pulled from an image registry.
|
||||
|
||||
> **Deprecated**: This field is only set when using the deprecated
|
||||
> legacy builder. It is included in API responses for informational
|
||||
> purposes, but should not be depended on as it will be omitted
|
||||
> once the legacy builder is removed.
|
||||
type: "string"
|
||||
x-nullable: true
|
||||
example: ""
|
||||
@@ -1863,6 +1868,11 @@ definitions:
|
||||
The version of Docker that was used to build the image.
|
||||
|
||||
Depending on how the image was created, this field may be empty.
|
||||
|
||||
> **Deprecated**: This field is only set when using the deprecated
|
||||
> legacy builder. It is included in API responses for informational
|
||||
> purposes, but should not be depended on as it will be omitted
|
||||
> once the legacy builder is removed.
|
||||
type: "string"
|
||||
x-nullable: true
|
||||
example: "27.0.1"
|
||||
|
||||
@@ -1838,6 +1838,11 @@ definitions:
|
||||
Depending on how the image was created, this field may be empty and
|
||||
is only set for images that were built/created locally. This field
|
||||
is empty if the image was pulled from an image registry.
|
||||
|
||||
> **Deprecated**: This field is only set when using the deprecated
|
||||
> legacy builder. It is included in API responses for informational
|
||||
> purposes, but should not be depended on as it will be omitted
|
||||
> once the legacy builder is removed.
|
||||
type: "string"
|
||||
x-nullable: true
|
||||
example: ""
|
||||
@@ -1863,6 +1868,11 @@ definitions:
|
||||
The version of Docker that was used to build the image.
|
||||
|
||||
Depending on how the image was created, this field may be empty.
|
||||
|
||||
> **Deprecated**: This field is only set when using the deprecated
|
||||
> legacy builder. It is included in API responses for informational
|
||||
> purposes, but should not be depended on as it will be omitted
|
||||
> once the legacy builder is removed.
|
||||
type: "string"
|
||||
x-nullable: true
|
||||
example: "27.0.1"
|
||||
|
||||
@@ -48,6 +48,8 @@ type InspectResponse struct {
|
||||
// Depending on how the image was created, this field may be empty and
|
||||
// is only set for images that were built/created locally. This field
|
||||
// is omitted if the image was pulled from an image registry.
|
||||
//
|
||||
// Deprecated: this field is deprecated, and will be removed in the next release.
|
||||
Parent string `json:",omitempty"`
|
||||
|
||||
// Comment is an optional message that can be set when committing or
|
||||
@@ -80,6 +82,8 @@ type InspectResponse struct {
|
||||
// DockerVersion is the version of Docker that was used to build the image.
|
||||
//
|
||||
// Depending on how the image was created, this field may be omitted.
|
||||
//
|
||||
// Deprecated: this field is deprecated, and will be removed in the next release.
|
||||
DockerVersion string `json:",omitempty"`
|
||||
|
||||
// Author is the name of the author that was specified when committing the
|
||||
|
||||
Reference in New Issue
Block a user