diff --git a/packages/api/internal/orchestrator/client.go b/packages/api/internal/orchestrator/client.go index cb0a59d877..b4f888ac16 100644 --- a/packages/api/internal/orchestrator/client.go +++ b/packages/api/internal/orchestrator/client.go @@ -132,13 +132,13 @@ func isHealthy(alloc *nomadapi.AllocationListStub) bool { if alloc.DeploymentStatus == nil { zap.L().Warn("Allocation deployment status is nil", zap.String("allocation_id", alloc.ID)) - return false + return true } if alloc.DeploymentStatus.Healthy == nil { zap.L().Warn("Allocation deployment status healthy is nil", zap.String("allocation_id", alloc.ID)) - return false + return true } return *alloc.DeploymentStatus.Healthy diff --git a/packages/api/internal/orchestrator/client_test.go b/packages/api/internal/orchestrator/client_test.go index b702fc480d..36dbfa53f1 100644 --- a/packages/api/internal/orchestrator/client_test.go +++ b/packages/api/internal/orchestrator/client_test.go @@ -20,7 +20,7 @@ func TestIsHealthy(t *testing.T) { input: &nomadapi.AllocationListStub{ DeploymentStatus: nil, }, - expected: false, + expected: true, }, "healthy is nil": { input: &nomadapi.AllocationListStub{ @@ -28,7 +28,7 @@ func TestIsHealthy(t *testing.T) { Healthy: nil, }, }, - expected: false, + expected: true, }, "status is not healthy": { input: &nomadapi.AllocationListStub{