From f0f1793bcd204f7a1bc6cf67615acf9e83e54b56 Mon Sep 17 00:00:00 2001 From: Alex Shtin Date: Wed, 8 Jun 2022 14:07:38 -0700 Subject: [PATCH] Fix error details bug in deletenamespace workflow (#2954) --- develop/docker-compose/docker-compose.cdc.yml | 4 ++-- service/worker/deletenamespace/reclaimresources/workflow.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/develop/docker-compose/docker-compose.cdc.yml b/develop/docker-compose/docker-compose.cdc.yml index aaf522b1713..2a058c7ef7a 100644 --- a/develop/docker-compose/docker-compose.cdc.yml +++ b/develop/docker-compose/docker-compose.cdc.yml @@ -5,12 +5,12 @@ version: "3.5" services: temporal-ui-standby: - image: temporalio/ui:0.13.1 + image: temporalio/ui:2.0.0 container_name: temporal-dev-ui-standby environment: - TEMPORAL_UI_PORT=8081 temporal-ui-other: - image: temporalio/ui:0.13.1 + image: temporalio/ui:2.0.0 container_name: temporal-dev-ui-other environment: - TEMPORAL_UI_PORT=8082 \ No newline at end of file diff --git a/service/worker/deletenamespace/reclaimresources/workflow.go b/service/worker/deletenamespace/reclaimresources/workflow.go index 0e91dc96320..41766a87d45 100644 --- a/service/worker/deletenamespace/reclaimresources/workflow.go +++ b/service/worker/deletenamespace/reclaimresources/workflow.go @@ -175,15 +175,15 @@ func deleteWorkflowExecutions(ctx workflow.Context, params ReclaimResourcesParam if stderrors.As(err, &appErr) { switch appErr.Type() { case errors.ExecutionsStillExistErrType, errors.NoProgressErrType, errors.NotDeletedExecutionsStillExistErrType: + var notDeletedCount int var counterTag tag.ZapTag if appErr.HasDetails() { - var notDeletedCount int _ = appErr.Details(¬DeletedCount) counterTag = tag.Counter(notDeletedCount) } logger.Info("Unable to delete workflow executions.", tag.WorkflowNamespace(params.Namespace.String()), counterTag) // appErr is not retryable. Convert it to retryable for the server to retry. - return result, temporal.NewApplicationError(appErr.Message(), appErr.Type(), appErr.Details()) + return result, temporal.NewApplicationError(appErr.Message(), appErr.Type(), notDeletedCount) } } return result, fmt.Errorf("%w: EnsureNoExecutionsActivity: %v", errors.ErrUnableToExecuteActivity, err)