fix: fail the run when matrix expansion fails (#1187)

A `GetMatrixes` error was logged and discarded, leaving a nil matrix list. That collapsed `maxParallel` to zero, so no executor was built and the parallel executor returned nil for an empty list: the job reported success without running anything.

It now fails the run. Every error it returns is a workflow validation failure that GitHub rejects too, so nothing that runs there starts failing here.

Reviewed-on: https://gitea.com/gitea/runner/pulls/1187
Reviewed-by: bircni <bircni@icloud.com>
Co-authored-by: silverwind <me@silverwind.io>
This commit is contained in:
silverwind
2026-08-24 17:03:45 +00:00
committed by silverwind
parent e78123cee3
commit 7b4356c746
2 changed files with 19 additions and 1 deletions
+1 -1
View File
@@ -207,7 +207,7 @@ func (runner *runnerImpl) NewPlanExecutor(plan *model.Plan) common.Executor {
matrixes, err := job.GetMatrixes()
if err != nil {
log.Errorf("Error while get job's matrix: %v", err)
return fmt.Errorf("could not get job matrix: %w", err)
}
log.Debugf("Job Matrices: %v", matrixes)