Skip to content

Conversation

@Benehiko
Copy link
Member

@Benehiko Benehiko commented Aug 19, 2025

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

Commands that are affected include:

  • system.NewVersionCommand
  • system.NewInfoCommand
  • system.NewSystemCommand
  • system.NewEventsCommand
  • system.NewInspectCommand

- What I did

- How I did it

- How to verify it

- Human readable description for the release notes

Go SDK: cli/command/system: deprecate `NewVersionCommand`, `NewInfoCommand`, `NewSystemCommand`, `NewEventsCommand`, `NewInspectCommand`. 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
This patch deprecates exported system commands and moves the
implementation details to an unexported function.

Commands that are affected include:

- system.NewVersionCommand
- system.NewInfoCommand
- system.NewSystemCommand
- system.NewEventsCommand
- system.NewInspectCommand

Signed-off-by: Alano Terblanche <[email protected]>
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 system command constructors in the Docker CLI by moving them to unexported implementations while maintaining backward compatibility through wrapper functions.

Key changes:

  • Adds deprecation warnings to exported command constructor functions
  • Creates new unexported command constructors with the actual implementation
  • Updates internal usage to use the new unexported functions

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.

Show a summary per file
File Description
cli/command/system/version.go Deprecates NewVersionCommand and adds newVersionCommand with implementation
cli/command/system/info.go Deprecates NewInfoCommand and adds newInfoCommand with implementation
cli/command/system/events.go Deprecates NewEventsCommand and adds newEventsCommand with implementation
cli/command/system/inspect.go Deprecates NewInspectCommand and adds newInspectCommand with implementation
cli/command/system/cmd.go Deprecates NewSystemCommand and adds newSystemCommand with implementation
cli/command/commands/commands.go Adds nolint directives for deprecated function usage
cli/command/system/*_test.go Updates test files to use new unexported command constructors
cli/command/system/completion_test.go Updates completion test to use unexported function

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

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

@thaJeztah thaJeztah merged commit 9ca4ae9 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