-
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.
Emit events for all TaskRun lifecycle events
Emit events for additional TaskRun lifecyle events: - taskrun started - taskrun running - taskrun timeout Fix the logic in events.go to compare semantic equality as opposed to raw pointer equality. Fix broken EmitEvents unit tests and extend them to cover new functionality. Extend reconcile test to verify new events are sent. To do so, get the event recorder from the context when creating the controller - if avaialble. This allows using the fake recorder for testing instead of having to look for event related actions in the fake client go action list. Add documentation on events. Fixes #2328 Work towards #2082
- Loading branch information
Showing
10 changed files
with
308 additions
and
181 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<!-- | ||
--- | ||
linkTitle: "Events" | ||
weight: 2 | ||
--- | ||
--> | ||
# Events | ||
|
||
Tekton runtime resources, specifically `TaskRuns` and `PipelineRuns`, | ||
emit events when they are executed, so that users can monitor their lifecycle | ||
and react to it. Tekton emits [kubernetes events](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#event-v1-core), that can be retrieve from the resource via | ||
`kubectl describe [resource]`. | ||
|
||
No events are emitted for `Conditions` today (https://github.com/tektoncd/pipeline/issues/2461). | ||
|
||
## TaskRuns | ||
|
||
`TaskRun` events are generated for the following `Reasons`: | ||
- `Started`: this is triggered the first time the `TaskRun` is picked by the | ||
reconciler from its work queue, so it only happens if web-hook validation was | ||
successful. Note that this event does not imply that a step started executing, | ||
as several conditions must be met first: | ||
- task and bound resource validation must be successful | ||
- attached conditions must run successfully | ||
- the `Pod` associated to the `TaskRun` must be successfully scheduled | ||
- `Succeeded`: this is triggered once all steps in the `TaskRun` are executed | ||
successfully, including post-steps injected by Tekton. | ||
- `Failed`: this is triggered if the `TaskRun` is completed, but not successfully. | ||
Causes of failure may be: one the steps failed, the `TaskRun` was cancelled or | ||
the `TaskRun` timed out. | ||
|
||
## PipelineRuns | ||
|
||
`PipelineRun` events are generated for the following `Reasons`: | ||
- `Succeeded`: this is triggered once all `Tasks` reachable via the DAG are | ||
executed successfully. | ||
- `Failed`: this is triggered if the `PipelineRun` is completed, but not | ||
successfully. Causes of failure may be: one the `Tasks` failed or the | ||
`PipelineRun` was cancelled. |
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 was deleted.
Oops, something went wrong.
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.