Skip to content

cli-plugins/plugin: Run: allow customizing the CLI - #6475

Merged
austinvazquez merged 1 commit into
docker:masterfrom
thaJeztah:cli_plugin_options
Sep 24, 2025
Merged

cli-plugins/plugin: Run: allow customizing the CLI#6475
austinvazquez merged 1 commit into
docker:masterfrom
thaJeztah:cli_plugin_options

Conversation

@thaJeztah

@thaJeztahthaJeztah commented Sep 24, 2025

Copy link
Copy Markdown
Member

relates to:

Currently, the plugin.Run command constructs the DockerCli using the default options, assuming plugins run with all the same options as the CLI itself; to customize the CLI there's a "Apply" option, but this means mutating the CLI after it's already constructed, which is not ideal.

This patch adds a variadic ops argument to allow CLI plugins to pass custom options to use for the CLI, so that there's no need to mutate its config in most cases.

- Human readable description for the release notes

Go SDK: cli-plugins/plugin: Run: allow customizing the CLI

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

Currently, the plugin.Run command constructs the DockerCli using
the default options, assuming plugins run with all the same options
as the CLI itself; to customize the CLI there's a "Apply" option,
but this means mutating the CLI after it's already constructed, which
is not ideal.
This patch adds a variadic ops argument to allow CLI plugins to pass
custom options to use for the CLI, so that there's no need to mutate
its config in most cases.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztahthaJeztah added this to the 29.0.0 milestone Sep 24, 2025
@thaJeztahthaJeztah added impact/changelog kind/enhancement status/2-code-review area/plugins area/go-sdk Changes affecting the Go SDK impact/go-sdk Noteworthy (compatibility changes) in the Go SDK labels Sep 24, 2025
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Files with missing linesPatch %Lines
cli-plugins/plugin/plugin.go0.00%2 Missing ⚠️

📢 Thoughts on this report? Let us know!

@thaJeztah
thaJeztah marked this pull request as ready for review September 24, 2025 13:19
@austinvazquez
austinvazquez merged commit 8fbb70a into docker:masterSep 24, 2025
109 of 110 checks passed
@thaJeztah
thaJeztah deleted the cli_plugin_options branch September 24, 2025 14:23
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/go-sdkChanges affecting the Go SDKarea/pluginsimpact/changelogimpact/go-sdkNoteworthy (compatibility changes) in the Go SDKkind/enhancementprocess/cherry-pickedstatus/2-code-review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@thaJeztah@codecov-commenter@austinvazquez@robmry@vvoland