Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion src/lib/components/lines-and-dots/workflow-details.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
import { relativeTime, timeFormat } from '$lib/stores/time-format';
import type { WorkflowExecution } from '$lib/types/workflows';
import { formatDate } from '$lib/utilities/format-date';
import { formatDistanceAbbreviated } from '$lib/utilities/format-time';
import {
formatDistanceAbbreviated,
formatDuration,
} from '$lib/utilities/format-time';
import { getBuildIdFromVersion } from '$lib/utilities/get-deployment-build-id';
import { getSDKandVersion } from '$lib/utilities/get-sdk-version';
import { isWorkflowTaskCompletedEvent } from '$lib/utilities/is-event-type';
Expand Down Expand Up @@ -134,6 +137,14 @@
</DetailListLabel>
<DetailListTextValue text={elapsedTime} />

{#if workflow?.workflowExecutionTimeout}
<DetailListLabel>{translate('workflows.workflow-timeout')}</DetailListLabel>
<DetailListTextValue
text={formatDuration(workflow.workflowExecutionTimeout)}
tooltipText={formatDuration(workflow.workflowExecutionTimeout)}
/>
{/if}

<DetailListColumn>
<DetailListLabel>{translate('common.run-id')}</DetailListLabel>
<DetailListTextValue
Expand Down
1 change: 1 addition & 0 deletions src/lib/i18n/locales/en/workflows.ts
Original file line number Diff line number Diff line change
Expand Up @@ -315,4 +315,5 @@ export const Strings = {
'workflow-start-delay': 'Workflow Start Delay',
delayed: 'Delayed',
'execution-start': 'Execution Start',
'workflow-timeout': 'Workflow Timeout',
} as const;
13 changes: 13 additions & 0 deletions src/lib/models/__snapshots__/workflow-execution.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ exports[`toWorkflowExecution > should match the snapshot for Canceled workflows
"taskQueue": "canary-task-queue",
"url": "/workflows/temporal.fixture.cancelled.workflow.id/346e7a24-c660-4f91-a777-ffe3274d8144",
"versioningInfo": undefined,
"workflowExecutionTimeout": "0s",
"workflowExtendedInfo": {},
}
`;
Expand Down Expand Up @@ -102,6 +103,7 @@ exports[`toWorkflowExecution > should match the snapshot for Completed workflows
"taskQueue": "canary-task-queue",
"url": "/workflows/temporal.fixture.completed.workflow.id/202dcff6-7f35-4c65-995c-bcadce524fb1",
"versioningInfo": undefined,
"workflowExecutionTimeout": "0s",
"workflowExtendedInfo": {},
}
`;
Expand Down Expand Up @@ -148,6 +150,7 @@ exports[`toWorkflowExecution > should match the snapshot for Failed workflows 1`
"taskQueue": "canary-task-queue",
"url": "/workflows/temporal.fixture.failed.workflow.id/7e00b341-c579-4bb5-9e28-810d34ef4329",
"versioningInfo": undefined,
"workflowExecutionTimeout": "0s",
"workflowExtendedInfo": {},
}
`;
Expand Down Expand Up @@ -227,6 +230,7 @@ exports[`toWorkflowExecution > should match the snapshot for Running workflows 1
"taskQueue": "canary-task-queue",
"url": "/workflows/temporal.fixture.running.workflow.id/2a7ba421-f74b-4b8b-b9d8-e6e30e4caac7",
"versioningInfo": undefined,
"workflowExecutionTimeout": "0s",
"workflowExtendedInfo": {},
}
`;
Expand Down Expand Up @@ -311,6 +315,7 @@ exports[`toWorkflowExecution > should match the snapshot for Terminated workflow
"taskQueue": "canary-task-queue",
"url": "/workflows/temporal.fixture.completed.workflow.id/16c5fbe5-f82d-43c1-acbc-18c65c449ace",
"versioningInfo": undefined,
"workflowExecutionTimeout": "0s",
"workflowExtendedInfo": {},
}
`;
Expand Down Expand Up @@ -370,6 +375,7 @@ exports[`toWorkflowExecution > should match the snapshot for TimedOut workflows
"taskQueue": "canary-task-queue",
"url": "/workflows/temporal.fixture.timed-out.workflow.id/workflow.advanced-visibility/445a17cb-6cb4-4508-bc59-187d08c6c6e2",
"versioningInfo": undefined,
"workflowExecutionTimeout": "0s",
"workflowExtendedInfo": {},
}
`;
Expand Down Expand Up @@ -421,6 +427,7 @@ exports[`toWorkflowExecutions > should match the snapshot 1`] = `
"taskQueue": "canary-task-queue",
"url": "/workflows/temporal.fixture.cancelled.workflow.id/346e7a24-c660-4f91-a777-ffe3274d8144",
"versioningInfo": undefined,
"workflowExecutionTimeout": undefined,
"workflowExtendedInfo": {},
},
{
Expand Down Expand Up @@ -468,6 +475,7 @@ exports[`toWorkflowExecutions > should match the snapshot 1`] = `
"taskQueue": "canary-task-queue",
"url": "/workflows/temporal.fixture.completed.workflow.id/202dcff6-7f35-4c65-995c-bcadce524fb1",
"versioningInfo": undefined,
"workflowExecutionTimeout": undefined,
"workflowExtendedInfo": {},
},
{
Expand Down Expand Up @@ -511,6 +519,7 @@ exports[`toWorkflowExecutions > should match the snapshot 1`] = `
"taskQueue": "canary-task-queue",
"url": "/workflows/temporal.fixture.failed.workflow.id/7e00b341-c579-4bb5-9e28-810d34ef4329",
"versioningInfo": undefined,
"workflowExecutionTimeout": undefined,
"workflowExtendedInfo": {},
},
{
Expand Down Expand Up @@ -558,6 +567,7 @@ exports[`toWorkflowExecutions > should match the snapshot 1`] = `
"taskQueue": "canary-task-queue",
"url": "/workflows/temporal.fixture.running.workflow.id/2a7ba421-f74b-4b8b-b9d8-e6e30e4caac7",
"versioningInfo": undefined,
"workflowExecutionTimeout": undefined,
"workflowExtendedInfo": {},
},
{
Expand Down Expand Up @@ -605,6 +615,7 @@ exports[`toWorkflowExecutions > should match the snapshot 1`] = `
"taskQueue": "canary-task-queue",
"url": "/workflows/temporal.fixture.completed.workflow.id/dfd4039d-4bc0-4864-9a24-85d136814977",
"versioningInfo": undefined,
"workflowExecutionTimeout": undefined,
"workflowExtendedInfo": {},
},
{
Expand Down Expand Up @@ -652,6 +663,7 @@ exports[`toWorkflowExecutions > should match the snapshot 1`] = `
"taskQueue": "canary-task-queue",
"url": "/workflows/temporal.fixture.terminated.workflow.id/16c5fbe5-f82d-43c1-acbc-18c65c449ace",
"versioningInfo": undefined,
"workflowExecutionTimeout": undefined,
"workflowExtendedInfo": {},
},
{
Expand Down Expand Up @@ -699,6 +711,7 @@ exports[`toWorkflowExecutions > should match the snapshot 1`] = `
"taskQueue": "canary-task-queue",
"url": "/workflows/temporal.fixture.timed-out.workflow.id/445a17cb-6cb4-4508-bc59-187d08c6c6e2",
"versioningInfo": undefined,
"workflowExecutionTimeout": undefined,
"workflowExtendedInfo": {},
},
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ exports[`toWorkflowExecution > should match the snapshot for Canceled workflows
"taskQueue": "canary-task-queue",
"url": "/workflows/temporal.fixture.cancelled.workflow.id/346e7a24-c660-4f91-a777-ffe3274d8144",
"versioningInfo": undefined,
"workflowExecutionTimeout": "0s",
"workflowExtendedInfo": {},
}
`;
Expand Down Expand Up @@ -102,6 +103,7 @@ exports[`toWorkflowExecution > should match the snapshot for Completed workflows
"taskQueue": "canary-task-queue",
"url": "/workflows/temporal.fixture.completed.workflow.id/202dcff6-7f35-4c65-995c-bcadce524fb1",
"versioningInfo": undefined,
"workflowExecutionTimeout": "0s",
"workflowExtendedInfo": {},
}
`;
Expand Down Expand Up @@ -148,6 +150,7 @@ exports[`toWorkflowExecution > should match the snapshot for Failed workflows 1`
"taskQueue": "canary-task-queue",
"url": "/workflows/temporal.fixture.failed.workflow.id/7e00b341-c579-4bb5-9e28-810d34ef4329",
"versioningInfo": undefined,
"workflowExecutionTimeout": "0s",
"workflowExtendedInfo": {},
}
`;
Expand Down Expand Up @@ -227,6 +230,7 @@ exports[`toWorkflowExecution > should match the snapshot for Running workflows 1
"taskQueue": "canary-task-queue",
"url": "/workflows/temporal.fixture.running.workflow.id/2a7ba421-f74b-4b8b-b9d8-e6e30e4caac7",
"versioningInfo": undefined,
"workflowExecutionTimeout": "0s",
"workflowExtendedInfo": {},
}
`;
Expand Down Expand Up @@ -311,6 +315,7 @@ exports[`toWorkflowExecution > should match the snapshot for Terminated workflow
"taskQueue": "canary-task-queue",
"url": "/workflows/temporal.fixture.completed.workflow.id/16c5fbe5-f82d-43c1-acbc-18c65c449ace",
"versioningInfo": undefined,
"workflowExecutionTimeout": "0s",
"workflowExtendedInfo": {},
}
`;
Expand Down Expand Up @@ -370,6 +375,7 @@ exports[`toWorkflowExecution > should match the snapshot for TimedOut workflows
"taskQueue": "canary-task-queue",
"url": "/workflows/temporal.fixture.timed-out.workflow.id/workflow.advanced-visibility/445a17cb-6cb4-4508-bc59-187d08c6c6e2",
"versioningInfo": undefined,
"workflowExecutionTimeout": "0s",
"workflowExtendedInfo": {},
}
`;
Expand Down Expand Up @@ -421,6 +427,7 @@ exports[`toWorkflowExecutions > should match the snapshot 1`] = `
"taskQueue": "canary-task-queue",
"url": "/workflows/temporal.fixture.cancelled.workflow.id/346e7a24-c660-4f91-a777-ffe3274d8144",
"versioningInfo": undefined,
"workflowExecutionTimeout": undefined,
"workflowExtendedInfo": {},
},
{
Expand Down Expand Up @@ -468,6 +475,7 @@ exports[`toWorkflowExecutions > should match the snapshot 1`] = `
"taskQueue": "canary-task-queue",
"url": "/workflows/temporal.fixture.completed.workflow.id/202dcff6-7f35-4c65-995c-bcadce524fb1",
"versioningInfo": undefined,
"workflowExecutionTimeout": undefined,
"workflowExtendedInfo": {},
},
{
Expand Down Expand Up @@ -511,6 +519,7 @@ exports[`toWorkflowExecutions > should match the snapshot 1`] = `
"taskQueue": "canary-task-queue",
"url": "/workflows/temporal.fixture.failed.workflow.id/7e00b341-c579-4bb5-9e28-810d34ef4329",
"versioningInfo": undefined,
"workflowExecutionTimeout": undefined,
"workflowExtendedInfo": {},
},
{
Expand Down Expand Up @@ -558,6 +567,7 @@ exports[`toWorkflowExecutions > should match the snapshot 1`] = `
"taskQueue": "canary-task-queue",
"url": "/workflows/temporal.fixture.running.workflow.id/2a7ba421-f74b-4b8b-b9d8-e6e30e4caac7",
"versioningInfo": undefined,
"workflowExecutionTimeout": undefined,
"workflowExtendedInfo": {},
},
{
Expand Down Expand Up @@ -605,6 +615,7 @@ exports[`toWorkflowExecutions > should match the snapshot 1`] = `
"taskQueue": "canary-task-queue",
"url": "/workflows/temporal.fixture.completed.workflow.id/dfd4039d-4bc0-4864-9a24-85d136814977",
"versioningInfo": undefined,
"workflowExecutionTimeout": undefined,
"workflowExtendedInfo": {},
},
{
Expand Down Expand Up @@ -652,6 +663,7 @@ exports[`toWorkflowExecutions > should match the snapshot 1`] = `
"taskQueue": "canary-task-queue",
"url": "/workflows/temporal.fixture.terminated.workflow.id/16c5fbe5-f82d-43c1-acbc-18c65c449ace",
"versioningInfo": undefined,
"workflowExecutionTimeout": undefined,
"workflowExtendedInfo": {},
},
{
Expand Down Expand Up @@ -699,6 +711,7 @@ exports[`toWorkflowExecutions > should match the snapshot 1`] = `
"taskQueue": "canary-task-queue",
"url": "/workflows/temporal.fixture.timed-out.workflow.id/445a17cb-6cb4-4508-bc59-187d08c6c6e2",
"versioningInfo": undefined,
"workflowExecutionTimeout": undefined,
"workflowExtendedInfo": {},
},
]
Expand Down
3 changes: 3 additions & 0 deletions src/lib/models/workflow-execution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ export const toWorkflowExecution = (
response.workflowExecutionInfo.stateTransitionCount;
const defaultWorkflowTaskTimeout =
response.executionConfig?.defaultWorkflowTaskTimeout;
const workflowExecutionTimeout =
response.executionConfig?.workflowExecutionTimeout;
const pendingActivities: PendingActivity[] = toPendingActivities(
response.pendingActivities,
);
Expand Down Expand Up @@ -181,6 +183,7 @@ export const toWorkflowExecution = (
stateTransitionCount,
isRunning,
defaultWorkflowTaskTimeout,
workflowExecutionTimeout,
workflowExtendedInfo,
startDelay,
get canBeTerminated(): boolean {
Expand Down
6 changes: 5 additions & 1 deletion src/lib/types/workflows.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@ export type CountWorkflowExecutionsResponse = {

export type WorkflowExecutionConfig = Replace<
import('$lib/types').WorkflowExecutionConfig,
{ defaultWorkflowTaskTimeout: Duration }
{
defaultWorkflowTaskTimeout: Duration;
workflowExecutionTimeout?: Duration;
}
>;

export type WorkflowInteractionDefinition = {
Expand Down Expand Up @@ -180,6 +183,7 @@ export type WorkflowExecution = {
url: string;
isRunning: boolean;
defaultWorkflowTaskTimeout: Duration;
workflowExecutionTimeout?: Duration;
canBeTerminated: boolean;
callbacks: Callback[];
versioningInfo?: VersioningInfo;
Expand Down
Loading