-
Bug
-
Resolution: Done
-
Major
-
None
-
None
-
False
-
-
False
-
-
-
Customer Reported
If Repository CRs share the same name, Incoming Webhooks can match the wrong one
Since incoming-webhook requests specify the repository name and not the namespace, PaC lists Repository CRs from all namespaces and matches the first with the correct name. However Repository CRs do not need to have unique names outside of their namespace.
Workaround: None
Prerequisites (if any, like setup, operators/versions):
- Setup a cluster with PaC
Steps to Reproduce
- Create two Repository CRs in separate namespaces, each connecting to a different repository, with incoming_webhook configured, but sharing the same name
- Using curl, send an incoming-webhook request targetting reach of the repositories
Actual results:
Either one or both pipelineruns will start (depending on the pipelinerun definitions), but all that start will be associated with the same Repository CR
Expected results:
Two pipelineruns should start, one in each namespace, each associated with the correct Repository CR
Reproducibility (Always/Intermittent/Only Once):
Always or intermittant (depending on if the Repository List response ordering is consisten)
Acceptance criteria:
Incoming webhook requests must be deterministic and must uniquely identify the intended Repository CR (either through the parameters directly or through some internal logic)
Definition of Done:
Build Details:
Additional info (Such as Logs, Screenshots, etc):