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

Forgejo: /retest on successful pipeline shows failure status and comment when there are no failures

XMLWordPrintable

      Description of problem:

      On Forgejo, when a user runs /retest on a pull request where the Pipelines as Code CI has already succeeded (no failures), the system posts a "Pipelines as Code CI has failed" comment and adds a failure check/logo. The pipeline run itself remains successful, so the PR shows both a success check and a failure check. The failure is incorrect and misleading.

      The failure comment states: "could not find any PipelineRun in your .tekton/ directory", suggesting that the /retest flow re-validates the commit in a way that does not find the existing pipeline definition (e.g. remote annotations or non-.tekton location), and then reports that as a CI failure even when there were no actual test failures.

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

      • Forgejo (e.g. 13.0.4+gitea-1.22.0 or similar)
      • Pipelines as Code (Pac) configured with Forgejo
      • A repository using Pipelines as Code (e.g. pipeline defined via remote annotations or other mechanism, not necessarily under .tekton/)
      • A PR where Pac has already run and reported success

      Steps to Reproduce

      1. Open a PR that uses Pipelines as Code (e.g. remote annotations).
      2. Wait for Pac to run and post a success comment (e.g. "Pipelines as Code CI/piplinerun-... has successfully validated your commit").
      3. In the PR conversation, comment /retest.
      4. Observe the new Pac comment and the PR checks section.

      Actual results:

      • Pac posts a comment: "Pipelines as Code CI has failed" with "could not find any PipelineRun in your .tekton/ directory".
      • The PR checks show both:
        • Pipelines as Code CI / piplinerun-... — Success
        • Pipelines as Code CI — Failed
      • A failure logo/status is shown even though the pipeline run had no failures and the PR was mergeable.

      Expected results:

      • When /retest is used and there are no actual pipeline failures, no additional failure comment or failure check should be posted.
      • The PR should not show a failure logo for Pipelines as Code CI when the pipeline has succeeded; at most, the existing success status should remain or be refreshed without adding a spurious failure.

      Reproducibility (Always/Intermittent/Only Once):

      Always — reproducible when /retest is used after a successful run on a repo where pipeline is not defined under .tekton/ (e.g. remote annotations).

      Acceptance criteria:

      • When /retest is run and the pipeline has no failures, no "Pipelines as Code CI has failed" comment is posted.
      • No failure check/logo is added for Pipelines as Code CI when the pipeline actually succeeded.
      • Behavior is correct for both .tekton/-based and remote-annotation (or other) pipeline definitions.
      • Existing success reporting remains correct.

      Definition of Done:

      • Root cause of /retest re-validation (e.g. .tekton/ lookup) is identified and fixed or bypassed when appropriate.
      • Fix verified on Forgejo with a successful pipeline and /retest.
      • No spurious failure comments or checks when there are no failures.

      Additional info (e.g. logs, screenshots):

      Screenshot available showing: successful "Pipelines as Code CI/piplinerun-remote-annotations-rqd5q" run, then /retest comment, then "Pipelines as Code CI has failed" with "could not find any PipelineRun in your .tekton/ directory", and the PR checks showing both Success and Failed for Pipelines as Code CI.

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

                Created:
                Updated: