From cbf4b466e200673ea4179d109a556d549cd937ba Mon Sep 17 00:00:00 2001 From: Laura Whitaker Date: Mon, 21 Nov 2022 16:01:44 -0700 Subject: [PATCH 1/6] Remove Cause from title --- src/lib/components/workflow/workflow-typed-error.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/components/workflow/workflow-typed-error.svelte b/src/lib/components/workflow/workflow-typed-error.svelte index 645549d0a..c3b112f86 100644 --- a/src/lib/components/workflow/workflow-typed-error.svelte +++ b/src/lib/components/workflow/workflow-typed-error.svelte @@ -87,7 +87,7 @@ link: 'https://docs.temporal.io/visibility#search-attribute', }, NonDeterministicError: { - title: 'Cause Non Deterministic Error', + title: 'Non Deterministic Error', copy: 'The workflow task has failed due to non-deterministic error from workflow code. This usually means the workflow code has a non-backward compatible change without proper versioning branch.', }, }; From 0c3cd9fc2b8a98d2a81b5f405ff8dcb8ae86bfb0 Mon Sep 17 00:00:00 2001 From: Laura Whitaker Date: Tue, 29 Nov 2022 11:16:59 -0700 Subject: [PATCH 2/6] Update existing error copy --- .../workflow/workflow-typed-error.svelte | 37 +++++++++++++++---- 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/src/lib/components/workflow/workflow-typed-error.svelte b/src/lib/components/workflow/workflow-typed-error.svelte index c3b112f86..9409fa1ce 100644 --- a/src/lib/components/workflow/workflow-typed-error.svelte +++ b/src/lib/components/workflow/workflow-typed-error.svelte @@ -7,88 +7,109 @@ import EventSummaryRow from '$lib/components/event/event-summary-row.svelte'; const WORKFLOW_TASK_FAILED_ERROR_COPY = { + Unspecified: { + title: 'Unspecified', + copy: 'The Workflow Task failed for an unknown reason.', + }, UnhandledCommand: { title: 'Unhandled Command', - copy: 'The workflow task has failed because there are new available events since the last workflow task started. A retry workflow task has been scheduled and the workflow will have a chance to handle those new events.', + copy: 'The Workflow Task failed because there are new available events since the last Workflow Task started. A retry Workflow Task has been scheduled and the Workflow will have a chance to handle those new events.', }, BadScheduleActivityAttributes: { title: 'Bad Schedule Activity Attributes', + copy: 'The Workflow Task failed because of missing or incorrect ScheduleActivity attributes.', }, BadRequestCancelActivityAttributes: { title: 'Bad Request Cancel Activity Attributes', + copy: 'The Workflow Task failed because of bad RequestCancelActivity attributes. An Activity was scheduled to cancel, but the scheduled event id was never set.', }, BadStartTimerAttributes: { title: 'Bad Start Timer Attributes', + copy: 'The Workflow Task failed because the scheduled event is missing a timer id.', }, BadCancelTimerAttributes: { title: 'Bad Cancel Timer Attributes', + copy: 'The Workflow Task failed when trying to cancel a timer due to an unset timer id.', }, BadRecordMarkerAttributes: { title: 'Bad Record Marker Attributes', + copy: 'The Workflow Task failed because of a missing or invalid Marker name.', }, BadCompleteWorkflowExecutionAttributes: { title: 'Bad Complete Workflow Execution Attributes', + copy: 'The Workflow Task failed because of an unset attribute on CompleteWorkflowExecution.', }, BadFailWorkflowExecutionAttribute: { title: 'Bad Fail Workflow Execution Attributes', + copy: 'The Workflow Task failed because of an unset FailWorkflowExecution attribute or failure.', }, BadCancelWorkflowExecutionAttributes: { title: 'Bad Cancel Workflow Execution Attributes', + copy: 'The Workflow Task failed because of an unset attribute on CancelWorkflowExecution.', }, BadRequestCancelExternalAttributes: { title: 'Bad Request Cancel External Attributes', + copy: 'The Workflow Task failed due to an invalid attribute on a request to cancel an external Workflow. Check the failure message for more details.', }, BadContinueAsNewAttributes: { title: 'Bad Continue As New Attributes', + copy: 'The Workflow Task failed because it failed to validate on a ContinueAsNew attribute. Check the failure message for more details.', }, StartTimerDuplicateId: { title: 'Start Timer Duplicate', + copy: 'The Workflow Task failed because a timer with the given timer id has already started.', }, ResetStickyTaskQueue: { title: 'Reset Sticky Task Queue', + copy: 'The Workflow Task failed because the Sticky Task Queue needs to be reset. The system will automatically retry.', }, WorkflowWorkerUnhandledFailure: { title: 'Workflow Worker Unhandled Failure', - copy: 'The workflow task has failed due to an unhandled failure from the workflow code.', + copy: 'The Workflow Task failed due to an unhandled failure from the Workflow code.', actionCopy: 'deterministic constraints', link: 'https://docs.temporal.io/workflows/#deterministic-constraints', }, BadSignalWorkflowExecutionAttributes: { title: 'Bad Signal Workflow Execution Attributes', + copy: 'The Workflow Task failed to validate attributes for SignalWorkflowExecution. Check the failure message for more details.', }, BadStartChildExecutionAttributes: { title: 'Bad Start Child Execution Attributes', + copy: 'The Workflow Task failed to validate attributes needed for StartChildWorkflowExecution. Check the failure message for more details.', }, ForceCloseCommand: { title: 'Force Close Command', - copy: 'The workflow task was forced to close by the server. A retry will be scheduled if this is a recoverable error.', + copy: 'The Workflow Task was forced to close. A retry will be scheduled if the error is recoverable.', }, FailoverCloseCommand: { title: 'Failover Close Command', - copy: 'The workflow task was forced to close due to a namespace failover. A retry will be scheduled automatically.', + copy: 'The Workflow Task was forced to close due to a Namespace failover. A retry will be scheduled automatically.', }, BadSignalInputSize: { title: 'Bad Signal Input Size', + copy: 'The payload has exceeded the available input size on a Signal.', }, ResetWorkflow: { title: 'Reset Workflow', + copy: 'The system failed this Workflow Task. If a reset for this Workflow was requested check the progress on the new Workflow, otherwise reset this Workflow.', }, BadBinary: { title: 'Bad Binary', + copy: 'The system failed this Workflow Task because the deployment of this Worker is marked as bad binary.', }, ScheduleActivityDuplicatId: { title: 'Schedule Activity Duplicate ID', - copy: 'A duplicate Activity ID is used, please check if you have specified the same ActivityID in your workflow.', + copy: 'The Workflow Task failed because the Activity ID is already in use, please check if you have specified the same Activity ID in your workflow.', }, BadSearchAttributes: { - title: 'Missing Search Attributes', - copy: 'It looks like you might be missing search attributes, which might cause workflow tasks to continue to retry without success.', + title: 'Bad Search Attributes', + copy: 'A Search attribute is either missing or the value exceeds the limit. This might cause Workflow tasks to continue to retry without success.', actionCopy: 'configuring search attributes', link: 'https://docs.temporal.io/visibility#search-attribute', }, NonDeterministicError: { title: 'Non Deterministic Error', - copy: 'The workflow task has failed due to non-deterministic error from workflow code. This usually means the workflow code has a non-backward compatible change without proper versioning branch.', + copy: 'A non-deterministic error has caused the Workflow Task to fail. This usually means the workflow code has a non-backward compatible change without a proper versioning branch.', }, }; From 1ec8329af4f42616ba1867032065ece0d6a40765 Mon Sep 17 00:00:00 2001 From: Laura Whitaker Date: Tue, 29 Nov 2022 11:19:04 -0700 Subject: [PATCH 3/6] Add new errors --- .../workflow/workflow-typed-error.svelte | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/lib/components/workflow/workflow-typed-error.svelte b/src/lib/components/workflow/workflow-typed-error.svelte index 9409fa1ce..541f2941f 100644 --- a/src/lib/components/workflow/workflow-typed-error.svelte +++ b/src/lib/components/workflow/workflow-typed-error.svelte @@ -111,6 +111,26 @@ title: 'Non Deterministic Error', copy: 'A non-deterministic error has caused the Workflow Task to fail. This usually means the workflow code has a non-backward compatible change without a proper versioning branch.', }, + BadModifyWorkflowPropertiesAttributes: { + title: 'Bad Modify Workflow Properties Attributes', + copy: 'The Workflow Task failed to validate attributes on ModifyWorkflowProperty on the upsert memo.', + }, + PendingChildWorkflowsLimitExceeded: { + title: 'Pending Child Workflows Limit Exceeded', + copy: 'The capacity for pending child Workflows has been reached. The Workflow Task was failed to prevent any more child Workflows from being added.', + }, + PendingActivitiesLimitExceeded: { + title: 'Pending Activities Limit Exceeded', + copy: 'The capacity for pending Activities has been reached. The Workflow Task was failed to prevent another Activity from being created.', + }, + PendingSignalsLimitExceeded: { + title: 'Pending Signals Limit Exceeded', + copy: 'The capacity for pending Signals to be sent from this Workflow has been reached.', + }, + PendingRequestCancelLimitExceeded: { + title: 'Pending Request Cancel Limit Exceeded', + copy: 'The capacity for pending requests to cancel other Workflows has been reached.', + }, }; export let error: WorkflowTaskFailedEvent; From e8ae10d0b8ff452db9d29df4466443b336660085 Mon Sep 17 00:00:00 2001 From: Laura Whitaker Date: Wed, 30 Nov 2022 10:27:51 -0700 Subject: [PATCH 4/6] Add support link --- .../workflow/workflow-typed-error.svelte | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/lib/components/workflow/workflow-typed-error.svelte b/src/lib/components/workflow/workflow-typed-error.svelte index 541f2941f..d08893b7a 100644 --- a/src/lib/components/workflow/workflow-typed-error.svelte +++ b/src/lib/components/workflow/workflow-typed-error.svelte @@ -10,6 +10,7 @@ Unspecified: { title: 'Unspecified', copy: 'The Workflow Task failed for an unknown reason.', + contactSupport: true, }, UnhandledCommand: { title: 'Unhandled Command', @@ -139,12 +140,25 @@ WORKFLOW_TASK_FAILED_ERROR_COPY[ error?.workflowTaskFailedEventAttributes?.cause ] ?? {}; - $: ({ title = '', copy = '', actionCopy = '', link = '' } = errorCopy); + $: ({ + title = '', + copy = '', + actionCopy = '', + link = '', + contactSupport = false, + } = errorCopy); {#if !$updating && (title || copy)} -

{copy}

+

+ {copy} + {#if contactSupport} + Please contact support. + {/if} +

{#if actionCopy && link}

Learn more about {actionCopy}. From 1b1eade3246895fc38eb738a9e177408eca91bff Mon Sep 17 00:00:00 2001 From: Laura Whitaker Date: Wed, 30 Nov 2022 13:40:58 -0700 Subject: [PATCH 5/6] Add WorkflowTaskHeartbeatError --- .../workflow/workflow-typed-error.svelte | 29 ++++++++++++++++--- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/src/lib/components/workflow/workflow-typed-error.svelte b/src/lib/components/workflow/workflow-typed-error.svelte index d08893b7a..e560fa498 100644 --- a/src/lib/components/workflow/workflow-typed-error.svelte +++ b/src/lib/components/workflow/workflow-typed-error.svelte @@ -70,6 +70,10 @@ actionCopy: 'deterministic constraints', link: 'https://docs.temporal.io/workflows/#deterministic-constraints', }, + WorkflowTaskHeartbeatError: { + title: 'Workflow Task Heartbeat Error', + copy: 'The Workflow Task failed to send a heartbeat while executing long-running local Activities. These local Activities will re-execute on the next Workflow Task attempt. If this error is persistent, these local Activities will run repeatedly until the Workflow times out.', + }, BadSignalWorkflowExecutionAttributes: { title: 'Bad Signal Workflow Execution Attributes', copy: 'The Workflow Task failed to validate attributes for SignalWorkflowExecution. Check the failure message for more details.', @@ -134,12 +138,29 @@ }, }; + function getErrorCause( + error: WorkflowTaskFailedEvent, + ): WorkflowTaskFailedCause | 'WorkflowTaskHeartbeatError' { + if (!error || !error.workflowTaskFailedEventAttributes) { + return; + } + + const { + workflowTaskFailedEventAttributes: { failure, cause }, + } = error; + + if ( + failure?.applicationFailureInfo?.type === 'workflowTaskHeartbeatError' + ) { + return 'WorkflowTaskHeartbeatError'; + } + return cause; + } + export let error: WorkflowTaskFailedEvent; - $: errorCopy = - WORKFLOW_TASK_FAILED_ERROR_COPY[ - error?.workflowTaskFailedEventAttributes?.cause - ] ?? {}; + $: cause = getErrorCause(error); + $: errorCopy = WORKFLOW_TASK_FAILED_ERROR_COPY[cause] ?? {}; $: ({ title = '', copy = '', From 746b970240f7c710d1e78c78a4f9fe49400d9b97 Mon Sep 17 00:00:00 2001 From: Laura Whitaker Date: Wed, 30 Nov 2022 14:22:49 -0700 Subject: [PATCH 6/6] Capitalize Failure Message --- .../components/workflow/workflow-typed-error.svelte | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/lib/components/workflow/workflow-typed-error.svelte b/src/lib/components/workflow/workflow-typed-error.svelte index e560fa498..c7b532ac2 100644 --- a/src/lib/components/workflow/workflow-typed-error.svelte +++ b/src/lib/components/workflow/workflow-typed-error.svelte @@ -50,11 +50,11 @@ }, BadRequestCancelExternalAttributes: { title: 'Bad Request Cancel External Attributes', - copy: 'The Workflow Task failed due to an invalid attribute on a request to cancel an external Workflow. Check the failure message for more details.', + copy: 'The Workflow Task failed due to an invalid attribute on a request to cancel an external Workflow. Check the Failure Message for more details.', }, BadContinueAsNewAttributes: { title: 'Bad Continue As New Attributes', - copy: 'The Workflow Task failed because it failed to validate on a ContinueAsNew attribute. Check the failure message for more details.', + copy: 'The Workflow Task failed because it failed to validate on a ContinueAsNew attribute. Check the Failure Message for more details.', }, StartTimerDuplicateId: { title: 'Start Timer Duplicate', @@ -76,11 +76,11 @@ }, BadSignalWorkflowExecutionAttributes: { title: 'Bad Signal Workflow Execution Attributes', - copy: 'The Workflow Task failed to validate attributes for SignalWorkflowExecution. Check the failure message for more details.', + copy: 'The Workflow Task failed to validate attributes for SignalWorkflowExecution. Check the Failure Message for more details.', }, BadStartChildExecutionAttributes: { title: 'Bad Start Child Execution Attributes', - copy: 'The Workflow Task failed to validate attributes needed for StartChildWorkflowExecution. Check the failure message for more details.', + copy: 'The Workflow Task failed to validate attributes needed for StartChildWorkflowExecution. Check the Failure Message for more details.', }, ForceCloseCommand: { title: 'Force Close Command', @@ -118,7 +118,7 @@ }, BadModifyWorkflowPropertiesAttributes: { title: 'Bad Modify Workflow Properties Attributes', - copy: 'The Workflow Task failed to validate attributes on ModifyWorkflowProperty on the upsert memo.', + copy: 'The Workflow Task failed to validate attributes on ModifyWorkflowProperty on the upsert memo. Check the Failure Message for more details.', }, PendingChildWorkflowsLimitExceeded: { title: 'Pending Child Workflows Limit Exceeded',