jojo/services/actions/Test_tryHandleIncompleteMatrix/action_task_output.yml
Mathieu Fenniak 032b0bbeda [v14.0/forgejo] fix: empty dynamic matrix can leave action run hanging incomplete (#11072)
**Backport:** #11063

Fixes #11030.

When a `strategy.matrix` needs to be evaluated on the output of another job, it can become evaluated into an empty set of jobs.  In this case, and assuming no other jobs in the run are active, the run should reach a settled state.  The logic to check the other jobs in the run and determine if this state has been hit needs to be explicitly added to the job emitter.

To accomplish this change, this action run state logic was extracted out of `UpdateRunJobWithoutNotification` where it could be reused.

(cherry picked from commit c198082975)

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/11072
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Mathieu Fenniak <mathieu@fenniak.net>
Co-committed-by: Mathieu Fenniak <mathieu@fenniak.net>
2026-01-27 20:14:04 +01:00

55 lines
1 KiB
YAML

-
id: 100
task_id: 100
output_key: colors
output_value: '["red", "blue", "green"]'
-
id: 101
task_id: 101
output_key: colors
output_value: '[]'
-
id: 102
task_id: 102
output_key: datacenters
output_value: '["site-a", "site-b"]'
-
id: 103
task_id: 102
output_key: node-versions
output_value: '["12.x", "14.x"]'
-
id: 104
task_id: 102
output_key: pg_version
output_value: '[17, 18]'
-
id: 105
task_id: 103
output_key: entire-matrix
output_value: '{"datacenter": ["site-a", "site-b"], "node": ["12.x", "14.x"], "pg": [17, 18]}'
-
id: 106
task_id: 104
output_key: scalar-value
output_value: just some value
-
id: 107
task_id: 105
output_key: run-on-this
output_value: nixos-25.11
-
id: 108
task_id: 106
output_key: entire-matrix
output_value: '{"datacenter": ["site-a", "site-b"], "node": ["12.x", "14.x"], "pg": [17, 18]}'
-
id: 109
task_id: 107
output_key: run-on-this
output_value: nixos-25.11
-
id: 112
task_id: 110
output_key: empty-list
output_value: "[]"