Skip to content

Conversation

@thaJeztah
Copy link
Member

cli/command: NewDockerCli: don't depend on DockerCli.Apply

The Apply method was added when CLI options for constructing the CLI were rewritten into functional options in cli@7f207f3. There was no mention in the pull request of this method specifically, and this may have been related to work being done elsewhere on compose-on-kubernetes or the compose-cli plugin that may have needed options to modify the CLI config after it was already initialized.

We should try to remove functions that mutate the CLI configuration after initialization if possible (and likely remove the Apply method); currently this function is used in docker compose, but as part of a hack that can probably be avoided.

- Human readable description for the release notes

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

The Apply method was added when CLI options for constructing the CLI were
rewritten into functional options in [cli@7f207f3]. There was no mention
in the pull request of this method specifically, and this may have been
related to work being done elsewhere on compose-on-kubernetes or the
compose-cli plugin that may have needed options to modify the CLI config
after it was already initialized.

We should try to remove functions that mutate the CLI configuration after
initialization if possible (and likely remove the `Apply` method); currently
this function is used in docker compose, but as part of a hack that can
probably be avoided.

[cli@7f207f3]: docker@7f207f3

Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah thaJeztah added this to the 29.0.0 milestone Sep 24, 2025
@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 25.00000% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
cli/command/cli.go 25.00% 2 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@vvoland vvoland merged commit 7cc801d into docker:master Sep 24, 2025
99 checks passed
@thaJeztah thaJeztah deleted the no_apply branch September 24, 2025 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants