Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect PR Status for Tekton Pipeline Runs with Multiple Failed Tasks #1828

Open
a-y-esha opened this issue Nov 22, 2024 · 1 comment
Open

Comments

@a-y-esha
Copy link

Tekton Pipelines Version: 0.64.0
Pipeline-as-Code Version: 0.28.0

We are using Pipeline-as-Code (PaC) with a pipeline containing 63 tasks, 60 of which run unit tests in parallel for our PRs. We're encountering an issue where, if multiple tasks fail during the pipeline execution, the PR status on GitHub does not update correctly to reflect the failure. Instead, it continues to show:
Tekton PaC / full-suite In progress — CI has Started, even after the pipeline is no longer running.

Observations:

  • For pipelines where only one taskRun fails, the status updates on GitHub as expected, showing the pipeline as failed.

  • In cases with multiple task failures, we observe the incorrect "In progress" status despite the pipeline being completed.

We attempted to debug this issue by inspecting the PipelineRun YAML. Here's an excerpt of the status output:

status:
  - input: $(tasks.status)
    status: "False"
    value: $(tasks.status)
  - description: status of the task
  - input: $(tasks.status)
  - jq -r '.items[] | select(.status.conditions[].reason == "Running") | .metadata.name' \
  --patch='[{"op":"replace","path":"/spec/status","value":"Cancelled"}]'

Steps Taken to Resolve:
We added the annotation pipelinesascode.tekton.dev/check-run: "true" to our pipeline.

This was mentioned in other reports as a solution to update GitHub statuses correctly.
Unfortunately, it did not work in our case, and the PR status remained as "In progress" under the Tekton PaC / full-suite check.
We also verified that this behavior occurs consistently across all our pipelines that involve parallel tasks in separate pods.

Expected Behavior:

  • The GitHub PR status should accurately reflect the outcome of the pipeline, even when multiple tasks fail simultaneously.

Current Behavior:

  • PR status remains stuck as "In progress," misleading contributors and reviewers about the actual state of the pipeline.

Request for Help:
We are seeking guidance on:

  • Diagnosing why the annotation pipelinesascode.tekton.dev/check-run: "true" does not resolve the issue for pipelines with multiple failed tasks.

  • Ensuring the PR status accurately updates to failed when the PipelineRun or its TaskRuns fail.

This issue disrupts our CI process, as developers cannot rely on the PR status to determine the success or failure of the tests. Any insights or suggestions are greatly appreciated!

@chmouel
Copy link
Member

chmouel commented Nov 22, 2024

This is strange, the check-run: true would not work like that unless the reconciler don't react to the event of the pipelinerun (when it get created/updated etc..)

do you see any logs in the reconciler about that pipelinerun, is there any failures in there?

do you use concurrency as well?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants