From df946309e75d5129c9c414a3c8041ce4e99786ac Mon Sep 17 00:00:00 2001 From: Adam Faulkner Date: Mon, 3 Aug 2026 23:06:30 +0000 Subject: [PATCH] Fix deferred service dependency health check --- svcctl/svcctl.go | 3 ++- tests/deferred/BUILD.bazel | 12 ++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/svcctl/svcctl.go b/svcctl/svcctl.go index 58e7093..ff7c4d8 100644 --- a/svcctl/svcctl.go +++ b/svcctl/svcctl.go @@ -84,9 +84,10 @@ func handleStart(ctx context.Context, r *runner.Runner, serviceErrCh chan error, continue } - depsErr := s.WaitUntilHealthy(ctx) + depsErr := depService.WaitUntilHealthy(ctx) if depsErr != nil { http.Error(w, fmt.Sprintf("Failed to wait for %q until healthy", dep), http.StatusInternalServerError) + return } } } diff --git a/tests/deferred/BUILD.bazel b/tests/deferred/BUILD.bazel index be8c057..bb7a3c5 100644 --- a/tests/deferred/BUILD.bazel +++ b/tests/deferred/BUILD.bazel @@ -38,6 +38,18 @@ itest_service( ], autoassign_port = True, deferred = True, + deps = [":non_deferred_itest_service"], + exe = ":deferred", + http_health_check_address = "http://localhost:$${PORT}/healthz", + tags = ["requires-network"], +) + +itest_service( + name = "non_deferred_itest_service", + args = [ + "$${PORT}", + ], + autoassign_port = True, exe = ":deferred", http_health_check_address = "http://localhost:$${PORT}/healthz", tags = ["requires-network"],