Skip to content

Commit

Permalink
Fix Crash due to Matrix Validation in non Matrix Pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
khrm committed Jul 1, 2024
1 parent ba287f5 commit cb38e01
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/apis/pipeline/v1/pipeline_validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -791,6 +791,9 @@ func validateMatrix(ctx context.Context, tasks []PipelineTask) (errs *apis.Field
// since consuming a singular result produced by a matrix is currently not supported
func findAndValidateResultRefsForMatrix(tasks []PipelineTask, taskMapping map[string]PipelineTask) (resultRefs []*ResultRef, errs *apis.FieldError) {
for _, t := range tasks {
if !t.IsMatrixed() {
continue
}
for _, p := range t.Params {
if expressions, ok := p.GetVarSubstitutionExpressions(); ok {
if LooksLikeContainsResultRefs(expressions) {
Expand Down

0 comments on commit cb38e01

Please sign in to comment.