mirror of
https://gitea.com/gitea/runner.git
synced 2026-08-29 07:17:46 +00:00
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:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user