-
Notifications
You must be signed in to change notification settings - Fork 164
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add termination reason and message to the runner API (#2204)
* Introduce TerminationReason and JobState types * Handle runner API not avaiable when stopping Maybe relevant for local runner when the runner container or shim was stopped * Set max duration exceeded in termination message * Add max_duration_exceeded termination reason * Update shim OpenAPI spec * Revert using TerminationReason enum in shim The shim may expect any termination reason from the server * Send termination_reason.value to shim
- Loading branch information
Showing
13 changed files
with
193 additions
and
52 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package types | ||
|
||
type TerminationReason string | ||
|
||
const ( | ||
TerminationReasonExecutorError TerminationReason = "executor_error" | ||
TerminationReasonCreatingContainerError TerminationReason = "creating_container_error" | ||
TerminationReasonContainerExitedWithError TerminationReason = "container_exited_with_error" | ||
TerminationReasonDoneByRunner TerminationReason = "done_by_runner" | ||
TerminationReasonTerminatedByUser TerminationReason = "terminated_by_user" | ||
TerminationReasonTerminatedByServer TerminationReason = "terminated_by_server" | ||
TerminationReasonMaxDurationExceeded TerminationReason = "max_duration_exceeded" | ||
) | ||
|
||
type JobState string | ||
|
||
const ( | ||
JobStateDone JobState = "done" | ||
JobStateFailed JobState = "failed" | ||
JobStateRunning JobState = "running" | ||
JobStateTerminated JobState = "terminated" | ||
JobStateTerminating JobState = "terminating" | ||
) |
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.