Allow to stop running workflow (#15270)

https://github.com/user-attachments/assets/599154e4-8743-471b-b05a-721b635bcf4e

On stoppage:
- if no running steps, mark pending as failed and end the workflow
- if running steps, set as stopping and exit. Going to the next step, as
the workflow is not running anymore, it will naturally stop
This commit is contained in:
Thomas Trompette
2025-10-23 15:01:15 +02:00
committed by GitHub
parent 1cf442966d
commit 4effa5351c
23 changed files with 532 additions and 70 deletions
+25 -2
View File
@@ -1780,7 +1780,7 @@ export type Mutation = {
restorePageLayoutWidget: PageLayoutWidget;
retryJobs: RetryJobsResponse;
revokeApiKey?: Maybe<ApiKey>;
runWorkflowVersion: WorkflowRun;
runWorkflowVersion: RunWorkflowVersionOutput;
saveImapSmtpCaldavAccount: ImapSmtpCaldavConnectionSuccess;
sendInvitations: SendInvitationsOutput;
setMeteredSubscriptionPrice: BillingUpdateOutput;
@@ -1791,6 +1791,7 @@ export type Mutation = {
skipBookOnboardingStep: OnboardingStepSuccess;
skipSyncEmailOnboardingStep: OnboardingStepSuccess;
startChannelSync: ChannelSyncSuccess;
stopWorkflowRun: WorkflowRun;
submitFormStep: Scalars['Boolean'];
switchBillingPlan: BillingUpdateOutput;
switchSubscriptionInterval: BillingUpdateOutput;
@@ -2447,6 +2448,11 @@ export type MutationStartChannelSyncArgs = {
};
export type MutationStopWorkflowRunArgs = {
workflowRunId: Scalars['UUID'];
};
export type MutationSubmitFormStepArgs = {
input: SubmitFormStepInput;
};
@@ -3548,6 +3554,11 @@ export type RunWorkflowVersionInput = {
workflowVersionId: Scalars['UUID'];
};
export type RunWorkflowVersionOutput = {
__typename?: 'RunWorkflowVersionOutput';
workflowRunId: Scalars['UUID'];
};
export type SsoConnection = {
__typename?: 'SSOConnection';
id: Scalars['UUID'];
@@ -4413,9 +4424,21 @@ export enum WorkflowActionType {
export type WorkflowRun = {
__typename?: 'WorkflowRun';
workflowRunId: Scalars['UUID'];
id: Scalars['UUID'];
status: WorkflowRunStatusEnum;
};
/** Status of the workflow run */
export enum WorkflowRunStatusEnum {
COMPLETED = 'COMPLETED',
ENQUEUED = 'ENQUEUED',
FAILED = 'FAILED',
NOT_STARTED = 'NOT_STARTED',
RUNNING = 'RUNNING',
STOPPED = 'STOPPED',
STOPPING = 'STOPPING'
}
export type WorkflowStepPosition = {
__typename?: 'WorkflowStepPosition';
x: Scalars['Float'];