Skip to content

cli/command/container: remove use of ExecOptions.Detach as intermediate#6137

Merged
thaJeztah merged 1 commit intodocker:masterfrom
thaJeztah:execconfig_detach
Jun 17, 2025
Merged

cli/command/container: remove use of ExecOptions.Detach as intermediate#6137
thaJeztah merged 1 commit intodocker:masterfrom
thaJeztah:execconfig_detach

Conversation

@thaJeztah
Copy link
Copy Markdown
Member

relates to;

This field was added in moby@5130fe5d38837302e, which added it for use as intermediate struct when parsing CLI flags (through runconfig.ParseExec) in moby@c786a8ee5e9db8f5f.

Commit moby@9d9dff3d0d9e92adf rewrote the CLI to use Cobra, and as part of this introduced a separate execOptions type in api/client/container, however the ExecOptions.Detach field was still used as intermediate field to store the flag's value.

Given that the client doesn't use this field, let's remove its use to prevent giving the impression that it's used anywhere.

- What I did

- How I did it

- How to verify it

- Human readable description for the release notes

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

This field was added in [moby@5130fe5d38837302e], which
added it for use as intermediate struct when parsing CLI flags (through
`runconfig.ParseExec`) in [moby@c786a8ee5e9db8f5f].

Commit [moby@9d9dff3d0d9e92adf] rewrote the CLI to use
Cobra, and as part of this introduced a separate `execOptions` type in
`api/client/container`, however the ExecOptions.Detach field was still
used as intermediate field to store the flag's value.

Given that the client doesn't use this field, let's remove its use to
prevent giving the impression that it's used anywhere.

[moby@5130fe5d38837302e]: moby/moby@5130fe5
[moby@c786a8ee5e9db8f5f]: moby/moby@c786a8e
[moby@9d9dff3d0d9e92adf]: moby/moby@9d9dff3

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah added this to the 28.3.0 milestone Jun 17, 2025
@thaJeztah thaJeztah added status/2-code-review kind/refactor PR's that refactor, or clean-up code labels Jun 17, 2025
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jun 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 55.03%. Comparing base (dbb5872) to head (50da0ad).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6137      +/-   ##
==========================================
- Coverage   55.04%   55.03%   -0.01%     
==========================================
  Files         361      361              
  Lines       30152    30151       -1     
==========================================
- Hits        16596    16595       -1     
  Misses      12598    12598              
  Partials      958      958              
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@thaJeztah thaJeztah requested review from Benehiko and vvoland June 17, 2025 11:44
@thaJeztah thaJeztah merged commit ab2d683 into docker:master Jun 17, 2025
111 of 112 checks passed
@thaJeztah thaJeztah deleted the execconfig_detach branch June 17, 2025 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/refactor PR's that refactor, or clean-up code status/2-code-review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants