forked from tektoncd/pipeline
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sort pod container statuses based on Step order in taskSpec
This commit closes tektoncd#3239 Tekton determines the TaskRun status message of a failed TaskRun based on the results of the first terminated Step (pod container). Until now, Tekton sorted pod container statuses based on the FinishedAt and StartedAt timestamps set by Kubernetes. Occasionally, a Step terminated in response to the first terminated Step could have the same timestamps as the first terminated Step. Therefore, Tekton was not always able to correctly determine what the first terminated Step was, and as a result, Tekton may set an incorrect TaskRun status message. In this commit, pod container statuses are sorted based on the Step order set in the taskSpec. This order ought to be correct as Tekton enforces Steps to be scheduled in this order. In case Tekton adds extra Steps (such as for pipelineresources), Tekton updates the taskSpec with these Steps and makes the taskSpec availavle for sorting. Therefore, Tekton accounts for these internally added Steps when sorting.
- Loading branch information
Showing
3 changed files
with
120 additions
and
154 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.