Skip to content

Conversation

@Benehiko
Copy link
Member

This patch deprecates exported image commands and moves the implementation details to an unexported function.

Commands that are affected include:

  • image.NewBuildCommand
  • image.NewPullCommand
  • image.NewPushCommand
  • image.NewImagesCommand
  • image.NewImageCommand
  • image.NewHistoryCommand
  • image.NewImportCommand
  • image.NewLoadCommand
  • image.NewRemoveCommand
  • image.NewSaveCommand
  • image.NewTagCommand
  • image.NewPruneCommand

- What I did

- How I did it

- How to verify it

- Human readable description for the release notes

Go SDK: cli/command/container: deprecate `NewBuildCommand`, `NewPullCommand`, `NewPushCommand`, `NewImagesCommand`, `NewImageCommand`, `NewHistoryCommand`, `NewImportCommand`, `NewLoadCommand`, `NewRemoveCommand`, `NewSaveCommand`, `NewTagCommand`, `NewPruneCommand`. These functions will be removed in the next release.

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

@Benehiko Benehiko added impact/changelog impact/deprecation kind/refactor PR's that refactor, or clean-up code area/go-sdk Changes affecting the Go SDK impact/go-sdk Noteworthy (compatibility changes) in the Go SDK labels Aug 19, 2025
@Benehiko Benehiko added this to the 29.0.0 milestone Aug 19, 2025
@Benehiko Benehiko requested review from Copilot and thaJeztah August 19, 2025 12:17
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR deprecates exported image commands and moves their implementation to unexported functions as part of a refactoring effort. The goal is to prepare for removing these exported functions in a future release while maintaining backward compatibility through wrapper functions.

  • Adds deprecation warnings to all exported New*Command functions in the image package
  • Creates new unexported new*Command functions containing the actual implementation
  • Updates internal usages and tests to use the new unexported functions

Reviewed Changes

Copilot reviewed 23 out of 23 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
cli/command/image/build.go Deprecates NewBuildCommand and creates unexported newBuildCommand
cli/command/image/history.go Deprecates NewHistoryCommand and creates unexported newHistoryCommand
cli/command/image/import.go Deprecates NewImportCommand and creates unexported newImportCommand
cli/command/image/list.go Deprecates NewImagesCommand and creates unexported newImagesCommand
cli/command/image/load.go Deprecates NewLoadCommand and creates unexported newLoadCommand
cli/command/image/prune.go Deprecates NewPruneCommand and creates unexported newPruneCommand
cli/command/image/pull.go Deprecates NewPullCommand and creates unexported newPullCommand
cli/command/image/push.go Deprecates NewPushCommand and creates unexported newPushCommand
cli/command/image/remove.go Deprecates NewRemoveCommand and creates unexported newRemoveCommand
cli/command/image/save.go Deprecates NewSaveCommand and creates unexported newSaveCommand
cli/command/image/tag.go Deprecates NewTagCommand and creates unexported newTagCommand
cli/command/image/cmd.go Updates to use new unexported functions and adds staticcheck suppressions
cli/command/commands/commands.go Adds staticcheck suppressions for deprecated command usage

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

@codecov-commenter
Copy link

codecov-commenter commented Aug 19, 2025

This patch deprecates exported image commands and moves the
implementation details to an unexported function.

Commands that are affected include:

- image.NewBuildCommand
- image.NewPullCommand
- image.NewPushCommand
- image.NewImagesCommand
- image.NewImageCommand
- image.NewHistoryCommand
- image.NewImportCommand
- image.NewLoadCommand
- image.NewRemoveCommand
- image.NewSaveCommand
- image.NewTagCommand
- image.NewPruneCommand

Signed-off-by: Alano Terblanche <[email protected]>
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!

@thaJeztah thaJeztah merged commit c2a042e into docker:master Aug 19, 2025
93 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/go-sdk Changes affecting the Go SDK impact/changelog impact/deprecation impact/go-sdk Noteworthy (compatibility changes) in the Go SDK kind/refactor PR's that refactor, or clean-up code process/cherry-picked

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants