Skip to content

Commit

Permalink
remove example
Browse files Browse the repository at this point in the history
  • Loading branch information
QuanZhang-William committed Nov 8, 2023
1 parent d9f2e56 commit 1874f92
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 38 deletions.
33 changes: 0 additions & 33 deletions examples/v1/pipelineruns/alpha/param-enum.yaml

This file was deleted.

9 changes: 4 additions & 5 deletions pkg/reconciler/pipelinerun/pipelinerun.go
Original file line number Diff line number Diff line change
Expand Up @@ -390,11 +390,10 @@ func (c *Reconciler) resolvePipelineState(

if config.FromContextOrDefaults(ctx).FeatureFlags.EnableParamEnum {
for _, tr := range resolvedTask.TaskRuns {
if len(tr.Status.Conditions) > 0 {
cond := resolvedTask.TaskRuns[0].Status.Conditions[0]
if cond.Status == corev1.ConditionFalse && cond.Reason == v1.TaskRunReasonInvalidParamValue {
pr.Status.MarkFailed(v1.PipelineRunReasonInvalidParamValue.String(),
"Invalid param value in the referenced Task from PipelineTask \"%s\": %s", resolvedTask.PipelineTask.Name, cond.Message)
for _, cond := range tr.Status.Conditions {
if cond.Type == apis.ConditionSucceeded && cond.Status == corev1.ConditionFalse && cond.Reason == v1.TaskRunReasonInvalidParamValue {
err = fmt.Errorf("invalid param value in the referenced Task from PipelineTask \"%s\": %s", resolvedTask.PipelineTask.Name, cond.Message)
pr.Status.MarkFailed(v1.PipelineRunReasonInvalidParamValue.String(), err.Error())
return nil, controller.NewPermanentError(err)
}
}
Expand Down

0 comments on commit 1874f92

Please sign in to comment.