Repository navigation
Commit 07f8f9b
committed
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-5181 parent d227561 commit 07f8f9b
1 file changed
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
| 228 | + | |
| 229 | + | |
228 | 230 | | |
229 | 231 | | |
230 | 232 | | |
| |||
335 | 337 | | |
336 | 338 | | |
337 | 339 | | |
| 340 | + | |
| 341 | + | |
338 | 342 | | |
339 | 343 | | |
340 | 344 | | |
| |||
0 commit comments