Skip to content

docs(compose): drop the comments that still describe the deleted imperative start path - #14398

Merged
ndeloof merged 4 commits into
docker:mainfrom
ndeloof:chore/drop-imperative-start-comments
Oct 27, 2026
Merged

ndeloof merged 4 commits into
docker:mainfrom
ndeloof:chore/drop-imperative-start-comments

Conversation

@ndeloof

@ndeloof ndeloof commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

What this PR does, in one sentence

Rewrites the comments of pkg/compose that still describe the imperative start path deleted by the migration of compose start to the plan engine, without touching a line of code.

Context

startService and startServiceContainer are gone since compose start runs on a start-only plan (#14296). About fifty comments, in the reconciler, the executor, start/up and their tests, still cite them — or isNotRunning, or a start "walked by InDependencyOrder" — as the source of a behavior the plan now owns. A reader looking for those functions finds nothing, and a few comments say which commands still walk the dependency order, which is no longer true (only restart, stop, down and the classic build do).

What the PR brings

  • The comments state the behavior itself instead of pointing at deleted code, keeping the rationale (why a scale-0 service is still visited, why compose start stays silent on a no-op, why the wait timeout applies without --wait, …) and dropping the migration history (review-finding anecdotes, "the old engine").
  • The header of service_containers.go and a few helper comments now name the commands that really still use the dependency order.
  • The comment of startMx now ties the mutex to [BUG] docker engine and desktop expose random ports differently #12846 and states that Engine 28.3.0 fixed the cause (Avoid selecting duplicate host ports for mappings to 0.0.0.0 and specific addresses moby/moby#50054), so that it can be found and removed once Engine 28.x is out of support. It also says which start paths take it: the plan executor's only, not restart, run, the relay or the hook runners, which the previous wording claimed.
  • Nothing else: no code, no directive (//go:, //nolint), no test changed. Four commits — production comments, test comments, a rewrap that follows their review, and the startMx annotation — so each reads on its own.

Why this is no functional change

  • Every added or removed line of the diff is a // comment line.
  • The token stream of each of the 394 Go files of pkg/, cmd/ and internal/, comments excluded, is identical before and after (a control mutation of one return is detected by the same check).
  • Binaries built from main and from this branch have the same symbols, sizes and types; only the line tables (runtime.pclntab, runtime.epclntab) and the VCS stamp of the build info differ, as expected when comment lines move.
  • go vet, gofmt and the linter are unchanged (only the known findings), and go test ./pkg/... -race passes except pkg/watch, which fails the same way on main.
  • The standalone e2e suite, run with the same environment on both binaries: 332 results each, no difference at all (318 pass, 3 skipped, and the same 11 failures on both sides: the provider scenarios cannot find example-provider in the PATH, and TestComposeModel).

Part of #14081 (Lot 3). The other half of the lot — moving the dependency-wait helpers out of service_containers.go — follows #14385, which rewrites waitDependencyReached.

🤖 Generated with Claude Code

… start path

startService and startServiceContainer were removed by the migration of
compose start to the plan engine, yet many comments still cite them, or
isNotRunning, or describe the start as walked by InDependencyOrder.
Rewrite them to state the behavior itself, and fix the ones that say
which commands still walk the dependency order.

Comments only: the token stream of every Go file, comments excluded, is
unchanged.

Part of docker#14081

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
Same cleanup as the previous commit, for the comments of the unit tests:
they cite startService, isNotRunning and the "old imperative engine" as
the source of a behavior the plan now owns.

Comments only: the token stream of every Go file, comments excluded, is
unchanged.

Part of docker#14081

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
Follow-up of the two previous commits, from their review: rewrap the
comments they left with an orphan line, give two of them back a subject,
point one at the plan's wait nodes, and drop the "imperative engine"
wording of the restart tests, restart being the one command that still
walks the dependency order itself.

Comments only: the token stream of every Go file, comments excluded, is
unchanged.

Part of docker#14081

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
startMx works around duplicate published host ports on Engine 28.0 to
28.2 (docker#12846), a daemon port-allocator flaw fixed in Engine
28.3.0 (moby/moby#50054). Say so in its comment, state which start paths
take it, and add a TODO to remove it once Engine 28.x is out of support.

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
@ndeloof
ndeloof requested review from a team as code owners October 27, 2026 10:07

@docker-agent docker-agent left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Assessment: 🟢 APPROVE

@codecov

codecov Bot commented Oct 27, 2026

Copy link
Copy Markdown

Codecov Report

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

Files with missing lines Patch % Lines
pkg/compose/service_containers.go 66.66% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

@ndeloof
ndeloof merged commit d9f64aa into docker:main Oct 27, 2026
63 of 65 checks passed
@ndeloof
ndeloof deleted the chore/drop-imperative-start-comments branch October 27, 2026 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants