openshift-pipelines / pipelines-as-code

Pipelines-as-Code for Tekton
https://pipelinesascode.com
Apache License 2.0
129 stars 81 forks source link

Length and case of branches #1145

Open linkan opened 1 year ago

linkan commented 1 year ago

There seems to be problems with long branch-names and upperCase. Normally we filter this stuff in the eventlistener.

{
  "severity": "ERROR",
  "logger": "pipelinesascode",
  "caller": "events/emit.go:45",
  "message": "PipelineRun blahblah has failed: creating pipelinerun blahblah in namespace has failed: PipelineRun.tekton.dev \"blahblahcnhbw\" is invalid: metadata.labels: Invalid value: \"refs-heads-feature-AB-1843-this-branch-were-created-in-bitbucket-server-from-a-jira-issue\": must be no more than 63 characters ",
  "provider": "bitbucket-server",
  "event-type": "",
  "stacktrace": "github.com/openshift-pipelines/pipelines-as-code/pkg/events.(*EventEmitter).EmitMessage\n\t/go/src/github.com/openshift-pipelines/pipelines-as-code/pkg/events/emit.go:45\ngithub.com/openshift-pipelines/pipelines-as-code/pkg/pipelineascode.(*PacRun).Run.func1\n\t/go/src/github.com/openshift-pipelines/pipelines-as-code/pkg/pipelineascode/pipelineascode.go:77"
}

Probably when setting label pipelinesascode.tekton.dev/branch. There will most likely be problems with upperCase also.

savitaashture commented 1 year ago

Hi @linkan can you try with latest Pipelines as Code it should be fixed now

Let us know if you still see the error