Repository navigation
refactor(compose): move the dependency wait helpers to their own file - #14401
Merged
Merged
Conversation
waitDependencies, the polling of a depends_on condition (waitDependency, waitDependencyReached and the per-condition checks), shouldWaitForDependency and the container health probes they use leave service_containers.go for dependency_wait.go, and their tests for dependency_wait_test.go. The remaining clients of the waits are the plan's OpWaitCondition nodes, restart, run and the --wait verification of up and start. A pure move: every declaration, its comments included, is unchanged. Part of docker#14081 Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
…ice_containers.go The header of service_containers.go still listed the dependency waits among what it covers. Comments only. Part of docker#14081 Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
…ency wait Two comments still located waitDependency's runtime fallback in service_containers.go. Comments only. Part of docker#14081 Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
24 of 25 tasks
dock-tor
approved these changes
Oct 27, 2026
ndeloof
enabled auto-merge (rebase)
October 27, 2026 11:14
docker-agent
left a comment
Contributor
There was a problem hiding this comment.
Assessment: 🟢 APPROVE
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does, in one sentence
Moves the dependency-wait helpers out of
pkg/compose/service_containers.gointo their own file,dependency_wait.go, with their tests, without changing a line of what they do.Context
service_containers.gowas the home of the imperative engine that started the services. That engine is gone (the start phase runs on the plan, #14081), but the file kept the one thing that survived it: the polling of adepends_oncondition —waitDependency,waitDependencyReachedand the per-condition checks, shared by the plan executor and by what still waits outside a plan (restart,run,--wait). It was one third of the file and nearly half of its tests, under a name that no longer says what is in it.What the PR brings
dependency_wait.gogathers the waits ondepends_onconditions:waitDependencies,waitDependency,waitDependencyReached, the threecheckDependency*,shouldWaitForDependency,isServiceHealthy,isServiceCompletedand therunning_or_healthycondition. Their tests move todependency_wait_test.go.service_containers.gokeeps what is about the containers themselves, and its header now says so.pkg/composehas the same text before and after, and the lines added and removed are the same lines, apart from the new file's header and imports. No logic, no signature and no test changes. Two comments ofinternal/projectloaderthat named the old file now name the new one.Part of #14081 (Lot 3): with this one, the imperative start path is fully removed.
🤖 Generated with Claude Code