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

Wasteful GitHub querying of resources

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • None
    • Pipelines as Code
    • None
    • False
    • Hide

      None

      Show
      None
    • False

      Description of problem:

      The PaC controller fetches the list of changed files once for every PipelineRun definition under the .tekton directory. Given that the list of changed files is a static attribute for an event, this is unnecessary.

      On a repository with ~400 PipelineRuns, this takes about 2 minutes to process, and often causes rate-limiting from GitHub. If I remove the path changed labels from my PipelineRuns, this happens within a few seconds.

      (The code seems to suggest that this is also the behavior when using cel expressions that check for changed paths.)

      NOTE: If both pipelinesascode.tekton.dev/on-path-change and pipelinesascode.tekton.dev/on-path-change-ignore are used, the files are fetched twice for each PipelineRun.

      The problem appears to be in annotation_matcher.go which implies it affects all providers, not just GitHub.

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

      Steps to Reproduce

       # <steps>

       

      Actual results:

      Expected results:

      Reproducibility (Always/Intermittent/Only Once):

      Acceptance criteria: 

       

      Definition of Done:

      Build Details:

      Additional info (Such as Logs, Screenshots, etc):

       

       *

              rh-ee-akpant Akshay Pant
              lucarval@redhat.com Luiz Carvalho
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: