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

PaC Incoming Webhook requests can match the wrong Repository CR

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • None
    • None
    • Pipelines as Code
    • False
    • Hide

      None

      Show
      None
    • 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):

       

       *

              Unassigned Unassigned
              rh-ee-athorp Andrew Thorp
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: