From ca17408786472e06f735d45004c9fe7e9997607d Mon Sep 17 00:00:00 2001 From: Matt Toohey Date: Tue, 17 Dec 2024 15:16:07 +1100 Subject: [PATCH] fix: wait for dev endpoint to be available before runner is ready (#3794) This became apparent when pubsub would immediately start trying to consume events once the runner claimed to be ready. --- backend/runner/runner.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/backend/runner/runner.go b/backend/runner/runner.go index 3901abba6..20deb434a 100644 --- a/backend/runner/runner.go +++ b/backend/runner/runner.go @@ -397,6 +397,11 @@ func (s *Service) deploy(ctx context.Context, key model.DeploymentKey, module *s logger.Errorf(err, "could not create FTL dev Config") } } + err = rpc.Wait(ctx, backoff.Backoff{}, time.Second*10, client) + if err != nil { + observability.Deployment.Failure(ctx, optional.Some(key.String())) + return fmt.Errorf("failed to ping dev endpoint: %w", err) + } } else { err := download.ArtefactsFromOCI(ctx, s.controllerClient, key, deploymentDir, s.storage) if err != nil {