Dispatch “Hook executed successfully but returned HTTP 500 failed to create pipeline run” on Setting Webhooks
Impacted Versions: Dispatch 1.0, Dispatch 1.1.x
Summary
Under Webhook Settings, it is possible to encounter an error message with the following message:
Hook executed successfully but returned HTTP 500 failed to create pipeline run “dispatch-generate-pipeline---“: PipelineRun.tekton.dev “dispatch-generate-pipeline---” is invalid: metadata.labels: Invalid value: “/“: a valid label must be an empty string or consist of alphanumeric characters, ‘-’, ‘_’ or ‘.’, and must start and end with an alphanumeric character (e.g. ‘MyValue’, or ‘my_value’, or ‘12345’, regex used for validation is ‘(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?’)
This is due to Dispatch being unable to parse multi level namespaces particularly three levels or deeper. In the affected versions, Dispatch assumes that there is only one “level:” / and thus put everything in after the first segment in the repository label.
Recommendation
The fix was shipped with Dispatch 1.2 but will not be backported to older versions. We highly recommend upgrading to 1.2 if this issue is encountered.