pipelines-as-code
pipelines-as-code copied to clipboard
Code Enhancement: Merge patch calls in PAC controller
In controller after creating pipelineruns we do 2 patch calls
- https://github.com/openshift-pipelines/pipelines-as-code/blob/15d27261cb6419b96a49a32d5a9666077618c086/pkg/pipelineascode/pipelineascode.go#L174 the first one is for patching logURL annotation
- https://github.com/openshift-pipelines/pipelines-as-code/blob/15d27261cb6419b96a49a32d5a9666077618c086/pkg/pipelineascode/pipelineascode.go#L92 the second one happens for patching order execution annotation when concurency is enabled.
This 2 patch calls can be clubbed together
Make sure the logic is not changing
- 2nd call happens only when concurrency is enabled
- 1st happens for all events except from GitHub App