Skip to content

Commit d09e388

Browse files
gabemonterochmouel
authored andcommitted
return original pipelinerun vs. nil on patch error
1 parent 802f08c commit d09e388

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/action/patch.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ func PatchPipelineRun(ctx context.Context, logger *zap.SugaredLogger, whatPatchi
3838
return nil
3939
})
4040
if err != nil {
41-
return nil, fmt.Errorf("failed to patch pipelinerun %v/%v with %v: %w", pr.Namespace, whatPatching, pr.Name, err)
41+
// return the original PipelineRun, let the caller decide what to do with it after the error is processed
42+
return pr, fmt.Errorf("failed to patch pipelinerun %v/%v with %v: %w", pr.Namespace, whatPatching, pr.Name, err)
4243
}
4344
return patchedPR, nil
4445
}

0 commit comments

Comments
 (0)