Skip to content

Commit

Permalink
Fix error details bug in deletenamespace workflow (#2954)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexshtin committed Jun 8, 2022
1 parent 9de6b45 commit f0f1793
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions develop/docker-compose/docker-compose.cdc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions service/worker/deletenamespace/reclaimresources/workflow.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(&notDeletedCount)
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)
Expand Down

0 comments on commit f0f1793

Please sign in to comment.