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

comment commit payload is not subsituted as CEL expresion

XMLWordPrintable

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

      None

      Show
      None
    • False

      Problem Statement: When a PipelineRun is triggered by a GitOps command (e.g., /retest) placed on a pushed commit (which arrives as a GitLab Note Hook event), the event payload sent to PaC is missing or mis-structured. Specifically, the template expressions used to extract commit metadata—such as {{{{ body.commit.title }}}} or {}{{ body.commit.message }} {}are not being resolved to the actual commit details.

      Instead of the resolved commit title, the variable remains as the literal, un-substituted CEL expression string (e.g., {}{{ has(body.commits) ... }}{}). This indicates a failure in the initial payload parsing and event construction within the PaC controller for Note Hook events targeting commits.

      This bug currently forces users to employ disruptive workarounds (e.g., pushing empty commits) to re-run failed pipelines, as all direct re-triggering methods lose the crucial commit context.

       

      Steps to Reproduce

       

      1. Prerequisites: Set up a GitLab repository managed by Pipelines as Code (PaC) that has a PipelineRun configured to run on [push] events to a branch (e.g., main).
      1. Inspect Original Payload (for comparison): Confirm the original Push Hook event contains the body.commits[n].title field (it should).
      1. Attempt Retrigger: Navigate to the failed commit on the GitLab UI and add a comment containing the GitOps command: /retest.
      1. Inspect Logs (PaC Controller): Observe the PaC controller logs when the Note Hook event is processed.
      1. Actual Result: The logs (and the resulting PipelineRun) will show that the CEL expression or template variable intended to extract the commit title/message remains as an unparsed string:

       

      Acceptance Criteria

       

      1. When a PipelineRun is triggered by a /retest command on a pushed commit (GitLab Note Hook), the commit metadata (title, message, SHA) must be correctly resolved.
      1. The CEL expression {{{{ body.commit.title }}}} must correctly resolve to the commit's title from the GitLab Note Hook payload.
      1. The resulting PipelineRun must successfully run using the extracted commit details, eliminating the need for workarounds (like empty commits).

       

       

      This is referenced from https://issues.redhat.com/browse/KFLUXSPRT-6135

       

      Also internal slack thread https://redhat-internal.slack.com/archives/C04PZ7H0VA8/p1764309418055949?thread_ts=1764241226.371129&cid=C04PZ7H0VA8 

              rh-ee-zashaikh Zaki Shaikh
              prkumar@redhat.com Praveen Kumar
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: