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

Add Support for Cancel-In-Progress When Pull Request is Closed/Merged

XMLWordPrintable

    • 8
    • False
    • None
    • False
    • KONFLUX-134 - Cancel PipelineRuns on PR update
    • Hide
      The pipelinesascode.tekton.dev/cancel-in-progress: "true" annotation has been enhanced to include automatic cancellation of PipelineRuns when the associated pull request is closed or merged. This improvement reduces manual intervention and aligns PipelineRun management with standard pull request workflows.
      Show
      The pipelinesascode.tekton.dev/cancel-in-progress: "true" annotation has been enhanced to include automatic cancellation of PipelineRuns when the associated pull request is closed or merged. This improvement reduces manual intervention and aligns PipelineRun management with standard pull request workflows.

      Currently, the pipelinesascode.tekton.dev/cancel-in-progress: "true" annotation enables users to cancel a PipelineRun that is actively in progress. However, this feature does not automatically handle scenarios where the associated pull request (PR) is closed or merged.

      This feature request aims to extend the functionality of the cancel-in-progress annotation by introducing an automated mechanism to cancel ongoing PipelineRuns when the PR linked to the PipelineRun is closed or merged.

      Proposed Functionality:

      1. Trigger Condition: When a pull request linked to a PipelineRun is closed or merged, any active PipelineRun should automatically be canceled.
      1. Annotation Handling: The pipelinesascode.tekton.dev/cancel-in-progress: "true" annotation should be respected and applied in this automated workflow.

      Benefits:

      • Reduces manual intervention for managing PipelineRuns.
      • Conserves computational resources by stopping unnecessary builds triggered by closed or merged PRs.

      Acceptance Criteria:

      1. When a PR is closed or merged, any PipelineRuns associated with it are automatically canceled.
      1. No impact on completed or previously canceled runs.
      1. Logs or metrics provide visibility into automated cancellations.
      1. Comprehensive testing to ensure seamless integration with existing event-driven workflows.
      •  

              cboudjna@redhat.com Chmouel Boudjnah
              cboudjna@redhat.com Chmouel Boudjnah
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: