Repository navigation
Conversation
AkihiroSuda
reviewed
Nov 27, 2026
| testCase := nerdtest.Setup() | ||
|
|
||
| // The error message is nerdctl's. | ||
| testCase.Require = require.Not(nerdtest.Docker) |
Member
There was a problem hiding this comment.
You do not need to skip the test. You can just change the string to compare.
AkihiroSuda
reviewed
Nov 27, 2026
…dependencies compose up ignored these depends_on conditions with a warning, so a service could start before its dependency was ready. Wait for them before starting the service: healthy needs a healthcheck on the dependency and fails if it turns unhealthy or exits, completed_successfully fails on a non-zero exit code. Fixes containerd#2386 Signed-off-by: Srinivas Chippagiri <cvas22@gmail.com>
cvas22
force-pushed
the
feat/compose-depends-on-conditions
branch
from
November 27, 2026 07:21
7b7a0d3 to
9097aa4
Compare
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.
Fixes #2386.
nerdctl compose upwarnedIgnoring: service adminer: depends_on: db: condition service_healthyand started the service as soon as the dependency's container was created. Healthchecks themselves are supported now (--health-cmd, and the composehealthcheckis already mapped), so the condition can be honoured.Before a service is started,
upnow waits for the dependencies that declare:service_healthy: polls the health state label of each container of the dependency until it ishealthy. It fails if the dependency has no healthcheck, turnsunhealthy, or exits first.service_completed_successfully: waits for each container of the dependency to exit and fails on a non-zero exit code.service_started(the default) is unchanged, and--no-depsskips the waiting. Services were already started in dependency order.Notes
waitContainerHealthyhas a unit test with a fake container (healthy, unhealthy, no healthcheck, still starting). I ran it in a Linux container.service_completed_successfully, both when the dependency succeeds and when it exits with 3. I could only compile them locally (GOOS=linux go vet), so I'm relying on CI to run them.service_healthy, since the healthcheck timers need systemd. I would be glad to add one if you tell me how you would like it to run in CI.