Remove status check when ending workflow (#10299)

Should be possible to end workflow, not matter what the current status
is.
On failure before the workflow was started, this error prevent the
workflow to be marked as failed with the right error message.
This commit is contained in:
Thomas Trompette
2025-02-19 13:58:32 +01:00
committed by GitHub
parent d5b04fae28
commit d628958905

View File

@ -113,13 +113,6 @@ export class WorkflowRunWorkspaceService {
);
}
if (workflowRunToUpdate.status !== WorkflowRunStatus.RUNNING) {
throw new WorkflowRunException(
'Workflow cannot be ended as it is not running',
WorkflowRunExceptionCode.INVALID_OPERATION,
);
}
return workflowRunRepository.update(workflowRunToUpdate.id, {
status,
endedAt: new Date().toISOString(),