Uploaded image for project: 'OpenShift Pipelines'
  1. OpenShift Pipelines
  2. SRVKP-4468

UI should limit a number of characters for the github ref (branch name) to be total of 63, otherwise PaC fails

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Normal Normal
    • None
    • None
    • UI
    • False
    • None
    • False

      Prerequisites (if any, like setup, operators/versions):

      Steps to Reproduce

      1. Create an application in UI
      2. 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)
      3. 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)

      Reproducibility (Always/Intermittent/Only Once):

      Build Details:

      Additional info:

              karthik.jk Karthik Jeeyar
              dbaez@redhat.com Danny Baez
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: