-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make phase condition reasons part of the API
TaskRuns and PipelineRuns use the "Reason" field to complement the value of the "Succeeded" condition. Those values are not part of the API and are even owned by the underlying resource (pod) in case of TaskRuns. This makes it difficult to rely on them to understand that the state of the resource is. In case of corev1.ConditionTrue, the reason can be used to distinguish between: - Successful - Successful, some parts were skipped (pipelinerun only) In case of corev1.ConditionFalse, the reason can be used to distinguish between: - Failed - Failed because of timeout - Failed because of cancelled by the user In case of corev1.ConditionUnknown, the reason can be used to distinguish between: - Just started reconciling - Validation done, running (or still running) - Cancellation requested This is implemented through the following changes: - Bubble-up reasons for taskrun and pipelinerun to the v1beta1 API, except for reason that are defined by the underlying resource - Enforce the start reason to be set during condition init This allows for an additional change in the eventing module: the condition before and after can be used to decide whether to send an event at all. If they are different, the after condition now contains enough information to send the event. The cloudevent module is extended with ability to send the correct event based on both status and reason.
- Loading branch information
Showing
18 changed files
with
294 additions
and
120 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
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
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.