Skip to content

images: Extract ImageInspect from GetImage#48240

Merged
thaJeztah merged 1 commit intomoby:masterfrom
vvoland:imageservice-imageinspect
Jul 29, 2024
Merged

images: Extract ImageInspect from GetImage#48240
thaJeztah merged 1 commit intomoby:masterfrom
vvoland:imageservice-imageinspect

Conversation

@vvoland
Copy link
Copy Markdown
Contributor

@vvoland vvoland commented Jul 25, 2024

Remove a special Details parameter from the GetImage options and extract its behavior to a ImageInspect method as it was only used by the /images/{name}/json endpoint (docker image inspect).

This makes it easier for the containerd image service to output an image inspect output without having to use the same data structures as the graphdrivers.

@vvoland vvoland added area/images Image Service kind/refactor PR's that refactor, or clean-up code labels Jul 25, 2024
@vvoland vvoland added this to the 28.0.0 milestone Jul 25, 2024
Remove a special `Details` parameter from the `GetImage` options and
extract its behavior to a `ImageInspect` method as it was only used by
the `/images/{name}/json` endpoint (`docker image inspect`).

This makes it easier for the containerd image service to output an image
inspect output without having to use the same data structures as the
graphdrivers.

Signed-off-by: Paweł Gronowski <[email protected]>
@vvoland vvoland force-pushed the imageservice-imageinspect branch from 0d4b9a3 to cd11843 Compare July 25, 2024 18:13
@vvoland vvoland marked this pull request as ready for review July 25, 2024 19:17
@@ -26,6 +26,7 @@ type imageBackend interface {
ImageHistory(ctx context.Context, imageName string) ([]*image.HistoryResponseItem, error)
Images(ctx context.Context, opts image.ListOptions) ([]*image.Summary, error)
GetImage(ctx context.Context, refOrID string, options backend.GetImageOpts) (*dockerimage.Image, error)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this still needed on the backend?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh it is for ImageTag still (though it should be factored out).

@vvoland vvoland self-assigned this Jul 26, 2024
@vvoland vvoland requested review from dmcgowan and thaJeztah July 29, 2024 12:06
Copy link
Copy Markdown
Member

@laurazard laurazard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Copy Markdown
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@thaJeztah thaJeztah merged commit 9716e06 into moby:master Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/images Image Service kind/refactor PR's that refactor, or clean-up code status/2-code-review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants