Skip to content

Commit

Permalink
Support Tekton PipelineRunStopping status (kubeflow#545)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomcli authored Apr 16, 2021
1 parent bf46e8e commit 0f1147e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/src/apiserver/storage/run_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -605,8 +605,8 @@ func (s *RunStore) TerminateRun(runId string) error {
result, err := s.db.Exec(`
UPDATE run_details
SET Conditions = ?
WHERE UUID = ? AND (Conditions = ? OR Conditions = ? OR Conditions = ?)`,
model.RunTerminatingConditions, runId, string("Running"), string("Pending"), "")
WHERE UUID = ? AND (Conditions = ? OR Conditions = ? OR Conditions = ? OR Conditions = ?)`,
model.RunTerminatingConditions, runId, string("Running"), string("Pending"), "", string("PipelineRunStopping"))

if err != nil {
return util.NewInternalServerError(err,
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/lib/StatusUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export enum NodePhase {
CONDITIONCHECKFAILED = 'ConditionCheckFailed',
PIPELINERUNCANCELLED = 'PipelineRunCancelled',
PIPELINERUNCOULDNTCANCEL = 'PipelineRunCouldntCancel',
PIPELINERUNSTOPPING = 'PipelineRunStopping',
TASKRUNCANCELLED = 'TaskRunCancelled',
TASKRUNCOULDNTCANCEL = 'TaskRunCouldntCancel',
TERMINATED = 'Terminated',
Expand Down Expand Up @@ -136,6 +137,7 @@ export function statusToPhase(nodeStatus: string | undefined): NodePhase {
return 'Succeeded' as NodePhase;
else if (nodeStatus === 'ConditionCheckFailed') return 'Skipped' as NodePhase;
else if (nodeStatus === 'CouldntGetCondition') return 'Error' as NodePhase;
else if (nodeStatus === 'PipelineRunStopping') return 'Running' as NodePhase;
else if (
nodeStatus === 'PipelineRunCancelled' ||
nodeStatus === 'PipelineRunCouldntCancel' ||
Expand Down

0 comments on commit 0f1147e

Please sign in to comment.