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

In GitLab.cee/PaC nudging automerge scenario, canceled PipelineRun does not prevent MR from auto-merging

XMLWordPrintable

    • 2
    • False
    • Hide

      None

      Show
      None
    • False
    • Hide
      Fixed a bug in the GitLab provider where cancelled PipelineRuns were not properly recognized due to a spelling mismatch between “cancelled” (with double ll's) and “canceled” (expected by the GitLab API). This issue caused GitLab merge requests to auto-merge even when their associated PipelineRun was cancelled. The fix adds an explicit mapping from “cancelled” to “canceled” for GitLab API compatibility, ensuring that cancelled PipelineRuns are correctly reported and merge requests remain open as expected.
      Show
      Fixed a bug in the GitLab provider where cancelled PipelineRuns were not properly recognized due to a spelling mismatch between “cancelled” (with double ll's) and “canceled” (expected by the GitLab API). This issue caused GitLab merge requests to auto-merge even when their associated PipelineRun was cancelled. The fix adds an explicit mapping from “cancelled” to “canceled” for GitLab API compatibility, ensuring that cancelled PipelineRuns are correctly reported and merge requests remain open as expected.

      Summary:
      In a GitLab.cee Pipelines-as-Code (PaC) nudging automerge scenario, when a PipelineRun is manually canceled, the corresponding merge request (MR) is sometimes automatically merged.
      The expected behavior is that the MR should remain open, since its associated check (PipelineRun) did not complete successfully.

      It appears that PaC reports the pipeline status as "cancelled" (with two Ls), while GitLab expects "canceled" (with one L). Due to this mismatch, GitLab might not correctly interpret the canceled state, allowing the MR to be auto-merged even though the pipeline was canceled.

      Expected Behavior:

      • When a PipelineRun is canceled, the GitLab MR should remain open and not auto-merge.
      • PaC should report the canceled status in a format recognized by GitLab ("canceled").

      Actual Behavior:

      • The PipelineRun is canceled, but the MR is automatically merged in GitLab.
      • GitLab appears to misinterpret the reported status from PaC.

              rh-ee-abghosh Abhishek Ghosh
              rh-ee-abghosh Abhishek Ghosh
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: