-
Bug
-
Resolution: Done
-
Normal
-
None
-
False
-
None
-
False
-
-
Prerequisites (if any, like setup, operators/versions):
Steps to Reproduce
- Create an application in UI
- Specify component URL and under git options, specify git reference with branch that is longer than 63 chars (note: the branch must exist on github)
- Finish component creation
Actual results:
PipelineRun is not created
Logs from PaC controller:
{"severity":"ERROR","timestamp":"2023-03-22T14:56:38.406514047Z","logger":"pipelinesascode","caller":"events/emit.go:45","message":"PipelineRun devfile-sample-hello-world-fcal-on-push- has failed: creating pipelinerun devfile-sample-hello-world-fcal-on-push- in psturc-tenant has failed: PipelineRun.tekton.dev \"devfile-sample-hello-world-fcal-on-push-b4b8d\" is invalid: metadata.labels: Invalid value: \"refs-heads-really-long-branch-name-are-you-kidding-me-how-long-the-branch-name-could-be-omg-are-you-serious\": must be no more than 63 characters ","commit":"5e32bbb","provider":"github","event-id":"be4c03fa-c8c1-11ed-8d9a-6c6893fdf0ab","event-sha":"df7a7ceed4c84082b4c3448fe89faac17ee8e821","event-type":"push","stacktrace":"github.com/openshift-pipelines/pipelines-as-code/pkg/events.(*EventEmitter).EmitMessage\n\t/src/pkg/events/emit.go:45\ngithub.com/openshift-pipelines/pipelines-as-code/pkg/pipelineascode.(*PacRun).Run.func1\n\t/src/pkg/pipelineascode/pipelineascode.go:79"}
Expected results:
The git ref validation in UI does not allow user to specify git branch that is (in total) longer than 63 chars (note that it adds "refs-heads-" to the branch name, see the error above)