From 07f8f9b10db2cc175589df1eb894986fa69511da Mon Sep 17 00:00:00 2001 From: Milan Dufek Date: Tue, 25 Aug 2026 12:49:01 +0200 Subject: [PATCH] fix(ci): guard the matrix deployment jobs against an empty job list wait-for-deployment builds its matrix from build-helmreleases.outputs.staging_helmreleases, and create-auto-merge-prod-pr from updated_prod_cluster_names. Neither checked the value for '[]' first, unlike every other matrix job in this file (services-build and helm-charts-build both guard on != '[]' && != ''). A matrix that expands to zero combinations cannot produce a job, so the reusable-workflow call reports failure. On PR #2092 that surfaced as a gate failure with no failing job anywhere: 15 of the pipeline's 16 jobs were success or skipped, wait-for-deployment had no check run at all, and alls-green received gooddata-ruby-lcm-promote-pipeline result=failure with empty outputs. The trigger was #2094. Before it, create-staging-pr failed outright when there was nothing to deploy, so wait-for-deployment's !contains(needs.*.result, 'failure') was false and the job was skipped before its matrix was ever evaluated -- it showed up as 'skipped' in run 32728855771. Once create-staging-pr correctly succeeded on a no-op, the condition passed, the matrix was evaluated for the first time in this state, and it was empty. #2094 did not introduce this, it removed the failure that was masking it. staging_helmreleases is empty whenever stg1 already runs the built chart, which is the normal state after a previous attempt delivered its staging PR -- gitops-deployments#26557 in this case. create-auto-merge-prod-pr carries the same defect. It is latent here because the gate sets AUTO_MERGE: false, but it is live for any consumer that auto-merges into an already up-to-date production cluster. JIRA: GRIF-518 --- .github/workflows/lcm-pipeline.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/lcm-pipeline.yaml b/.github/workflows/lcm-pipeline.yaml index 9ca42eec7..32e9117f1 100644 --- a/.github/workflows/lcm-pipeline.yaml +++ b/.github/workflows/lcm-pipeline.yaml @@ -225,6 +225,8 @@ jobs: !cancelled() && !contains(needs.*.result, 'failure') && needs.build-helmreleases.result == 'success' && + needs.build-helmreleases.outputs.staging_helmreleases != '[]' && + needs.build-helmreleases.outputs.staging_helmreleases != '' && inputs.deploy strategy: matrix: @@ -335,6 +337,8 @@ jobs: !cancelled() && !contains(needs.*.result, 'failure') && needs.build-helmreleases.result == 'success' && + needs.build-helmreleases.outputs.updated_prod_cluster_names != '[]' && + needs.build-helmreleases.outputs.updated_prod_cluster_names != '' && inputs.AUTO_MERGE && inputs.deploy strategy: