Skip to content

Conversation

@vvoland
Copy link
Contributor

@vvoland vvoland commented Feb 14, 2025

To allow us being more flexible when adding new functionality to the client and reduce potential breaking changes to the interface in future, change the signatures of ImageLoad, ImageHistory and ImageSave to use variadic functional options, to mirror the same approach as ImageInspect.

Note: We could change all client functions to follow this approach, but currently this PR only does it for functions which already had a signature change in the master, but weren't released yet.

- How to verify it
CI

- Human readable description for the release notes

Go SDK: `ImageHistory`, `ImageLoad` and `ImageSave` now use variadic functional options

- A picture of a cute animal (not mandatory but encouraged)

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
@vvoland vvoland added status/2-code-review kind/enhancement Enhancements are not bugs or new features but can improve usability or performance. area/go-sdk labels Feb 14, 2025
@vvoland vvoland added this to the 28.0.0 milestone Feb 14, 2025
@vvoland vvoland self-assigned this Feb 14, 2025
@vvoland vvoland added impact/changelog impact/go-sdk Noteworthy (compatibility changes) in the Go SDK labels Feb 14, 2025
@vvoland vvoland changed the title Client funcopts client: Change ImageHistory, ImageLoad and ImageSave to use variadic functional options Feb 14, 2025
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
Copy link
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, thanks!

@crazy-max PTAL

Copy link
Member

@crazy-max crazy-max left a comment

Choose a reason for hiding this comment

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

SGTM

@thaJeztah thaJeztah merged commit f106ec1 into moby:master Feb 14, 2025
153 checks passed
}

// ImageAPIClientDeprecated defines deprecated methods of the ImageAPIClient.
type ImageAPIClientDeprecated interface {
Copy link
Member

Choose a reason for hiding this comment

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

@vvoland It seems we should have ImageLoad(ctx context.Context, input io.Reader, quiet bool) in ImageAPIClientDeprecated. Can we add it?

Copy link
Member

Choose a reason for hiding this comment

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

Ah nevermind we can't duplicate ImageLoad method 🙈

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/go-sdk impact/changelog impact/go-sdk Noteworthy (compatibility changes) in the Go SDK kind/enhancement Enhancements are not bugs or new features but can improve usability or performance. status/2-code-review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants