Skip to content

Commit

Permalink
Fix pipelineRun conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
JeromeJu authored and tekton-robot committed Oct 11, 2022
1 parent db644e1 commit e9e4cd6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion config/300-pipelinerun.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ spec:
conversion:
strategy: Webhook
webhook:
conversionReviewVersions: ["v1beta1"]
conversionReviewVersions: ["v1beta1", "v1"]
clientConfig:
service:
name: tekton-pipelines-webhook
Expand Down
4 changes: 2 additions & 2 deletions pkg/apis/pipeline/v1/pipelinerun_conversion.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ func (pr *PipelineRun) ConvertTo(ctx context.Context, sink apis.Convertible) err
if apis.IsInDelete(ctx) {
return nil
}
return fmt.Errorf("v1beta1 is the highest known version, got: %T", sink)
return fmt.Errorf("v1 is the highest known version, got: %T", sink)
}

// ConvertFrom implements apis.Convertible
func (pr *PipelineRun) ConvertFrom(ctx context.Context, source apis.Convertible) error {
if apis.IsInDelete(ctx) {
return nil
}
return fmt.Errorf("v1beta1 is the highest known version, got: %T", source)
return fmt.Errorf("v1 is the highest known version, got: %T", source)
}

0 comments on commit e9e4cd6

Please sign in to comment.