From 13b2300bf3eba022511b498559256c195008f350 Mon Sep 17 00:00:00 2001 From: Nicolas De Loof Date: Thu, 8 Oct 2026 11:41:55 +0200 Subject: [PATCH] fix(start): key the wait-timeout message on errWaitTimeout start() translated any DeadlineExceeded from the plan into a dependency-readiness message when --wait-timeout was set, including one from an engine call or a hook. Use the marker a wait node's own timeout now carries, as upDetached does. Signed-off-by: Nicolas De Loof --- pkg/compose/start.go | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/pkg/compose/start.go b/pkg/compose/start.go index 1ac7028a2..c04a64ea3 100644 --- a/pkg/compose/start.go +++ b/pkg/compose/start.go @@ -92,23 +92,7 @@ func (s *composeService) start(ctx context.Context, projectName string, options exec.waitTimeout = options.WaitTimeout if err := exec.run(ctx, plan); err != nil { - // Same distinction as upDetached: ctx.Err() == nil rules out ctx's - // own external deadline (unrelated to --wait-timeout) having fired - // during exec.run, so a DeadlineExceeded here can only be one of the - // plan's own OpWaitCondition nodes timing out. - if options.WaitTimeout > 0 && ctx.Err() == nil && errors.Is(err, context.DeadlineExceeded) { - if options.Wait { - return fmt.Errorf("application not healthy after %s", options.WaitTimeout) - } - // No --wait: this is the dependency-timeout failure - // waitDependencies already reports as "timeout waiting for - // dependencies" elsewhere -- matching that established, - // actionable message instead of leaking the raw - // "context deadline exceeded" a user never configured in those - // terms. - return errors.New("timeout waiting for dependencies") - } - return err + return translateWaitTimeout(err) } if !options.Wait {