-
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.
Consolidate cancel and timeout logic
Cancel and timeout do very similar things when they happen: they update the status of the taskrun, set the completion time and try and delete the pod. Today this is done for the two cases in different places, the code structured differently and the behaviour slightly different: - log levels of the messages are different - cancel does not set the completion time - cancel does not check if the error on pod deletion is a NotFound This commit introduces "HasTimedOut" to tasktun_types, which matches what "IsCancelled" does. It introduces a "killTaskRun" function that can be used by both cancel and timeout, with the only different being the "Reason" and termination message. The timeout_check module is not necessary anymore. The check for IsCancelled and HasTimedOut are move out of "reconcile" into "Reconcile", so that now "Reconcile" checks: - HasStarted - isDone - IsCancelled - HasTimedOut and finally, if applicable, it invokes "reconcile".
- Loading branch information
1 parent
adef1d5
commit 6b1579c
Showing
12 changed files
with
442 additions
and
454 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
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.