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

YAML Parsing Errors in PipelineRun Silently Ignored in GitHub Checks API

XMLWordPrintable

    • False
    • Hide

      None

      Show
      None
    • False
    • Hide

      Previously, errors in PipelineRun YAML (e.g., syntax issues like missing :) were only logged in the controller and not reported in the GitHub Checks tab of the Pull Request or anywhere else. This led to a poor user experience, as users were unaware of the issue unless they checked the logs.

      Fix:

          YAML parsing errors are now properly reported as a comment of the Pull Request.

          This ensures that users are immediately notified of issues and can take corrective action
      Show
      Previously, errors in PipelineRun YAML (e.g., syntax issues like missing :) were only logged in the controller and not reported in the GitHub Checks tab of the Pull Request or anywhere else. This led to a poor user experience, as users were unaware of the issue unless they checked the logs. Fix:     YAML parsing errors are now properly reported as a comment of the Pull Request.     This ensures that users are immediately notified of issues and can take corrective action

      Description of Problem:

      Previously, when a PipelineRun with invalid YAML was detected, the error was
      reported in the GitHub Checks tab of the Pull Request. However, after recent
      changes, these errors are now only logged in the controller and are not
      surfaced to the user in the GitHub Checks API. This results in a poor user
      experience, as users are being unaware of the issue unless they check the logs.

      Actual Results:

      • The GitHub Checks tab does not show any error or failure related to the invalid YAML.
      • The error is only logged in the controller logs, with a message like:
        🚨 08:39:42 pac-controller prun: tekton validation error: yaml: line 35: could not find expected :
        
      • Users are not notified of the issue in the GitHub UI.

      Expected Results:

      • The GitHub Checks tab should display an error or a failure status when a PipelineRun contains invalid YAML.
      • Users should receive clear feedback about the issue directly in the Pull Request, such as a comment or a failed check.

      Reproducibility:

      Always

      Acceptance Criteria:

      Definition of Done:

      • Errors in PipelineRun YAML are surfaced in the GitHub Checks tab.
      • Users are notified of YAML parsing errors directly in the Pull Request.
      • The fix is tested and verified in a real-world scenario.
      • Documentation is updated to reflect the new behavior.

      Build Details:

      • Controller Version: [Insert version here]
      • GitHub Integration Version: [Insert version here]

      Additional Info (Such as Logs, Screenshots, etc):

      Logs:

      💡 08:39:41 pac-controller issue_comment: pipelinerun recheck on chmouel/scratchmyback#344 has been requested  
      💡 08:39:42 pac-controller Using PipelineRun definition from source pull request chmouel/scratchmyback#344 SHA on 407080e913874ed2af476cb9a81a2676bbb8ce3b  
      💡 08:39:42 pac-controller matching pipelineruns to event: URL=https://github.com/chmouel/scratchmyback, target-branch=main, source-branch=on-assign, target-event=pull_request  
      💡 08:39:42 pac-controller matched pipelinerun with name: scratchmyback-pull-request on gitops comment: "/assign chmouel\r\n\r\n"  
      🚨 08:39:42 pac-controller prun: tekton validation error: yaml: line 35: could not find expected :  
      💡 08:39:42 pac-controller cannot locate templates in .tekton/ directory for this repository in on-assign  
      

        1. image-2025-02-03-09-42-48-597.png
          139 kB
          Chmouel Boudjnah
        2. image-2025-07-09-16-53-56-934.png
          254 kB
          Zaki Shaikh

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

                Created:
                Updated:
                Resolved: