From 264f16e73d2af4a04ab94474cb2c6f4d761fc4d3 Mon Sep 17 00:00:00 2001 From: jiechenz Date: Wed, 5 Aug 2026 10:13:45 -0700 Subject: [PATCH] Update workflow delete warning for passive-cluster rejection The server now rejects DeleteWorkflowExecution on a cluster that is passive for the Workflow, so the old warning's advice -- target the passive cluster directly with `--grpc-meta xdc-redirection=false` -- no longer works. State the rule instead: only the Workflow's active cluster accepts the deletion, and requests sent to a passive cluster are forwarded there by default. Updated in both the runtime warning and the `workflow delete` long help, with commands.gen.go regenerated from commands.yaml. The standalone activity warning is left as is: DeleteActivityExecution has no equivalent restriction, so targeting a passive cluster still works there. Co-Authored-By: Claude Opus 5 (1M context) --- internal/temporalcli/commands.gen.go | 4 ++-- internal/temporalcli/commands.workflow.go | 2 +- internal/temporalcli/commands.yaml | 5 ++--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/internal/temporalcli/commands.gen.go b/internal/temporalcli/commands.gen.go index 21f26a4aa..5823e5cf2 100644 --- a/internal/temporalcli/commands.gen.go +++ b/internal/temporalcli/commands.gen.go @@ -4316,9 +4316,9 @@ func NewTemporalWorkflowDeleteCommand(cctx *CommandContext, parent *TemporalWork s.Command.Use = "delete [flags]" s.Command.Short = "Remove Workflow Execution" if hasHighlighting { - s.Command.Long = "Delete a Workflow Execution and its Event History:\n\n\x1b[1mtemporal workflow delete \\\n --workflow-id YourWorkflowId\x1b[0m\n\nThe removal executes asynchronously. If the Execution is Running, the Service\nterminates it before deletion.\n\nWARNING: Deleting Workflow Executions in a global Namespace removes them from\nall replicas. Requests sent to a passive cluster are forwarded to the active\ncluster by default; to target the passive cluster directly, specify\n\x1b[1m--grpc-meta xdc-redirection=false\x1b[0m.\n\nVisit https://docs.temporal.io/visibility to read more about Search Attributes\nand Query creation. See \x1b[1mtemporal batch --help\x1b[0m for a quick reference." + s.Command.Long = "Delete a Workflow Execution and its Event History:\n\n\x1b[1mtemporal workflow delete \\\n --workflow-id YourWorkflowId\x1b[0m\n\nThe removal executes asynchronously. If the Execution is Running, the Service\nterminates it before deletion.\n\nWARNING: Deleting Workflow Executions in a global Namespace removes them from\nall replicas. Only the Workflow's active cluster accepts the deletion;\nrequests sent to a passive cluster are forwarded there by default.\n\nVisit https://docs.temporal.io/visibility to read more about Search Attributes\nand Query creation. See \x1b[1mtemporal batch --help\x1b[0m for a quick reference." } else { - s.Command.Long = "Delete a Workflow Execution and its Event History:\n\n```\ntemporal workflow delete \\\n --workflow-id YourWorkflowId\n```\n\nThe removal executes asynchronously. If the Execution is Running, the Service\nterminates it before deletion.\n\nWARNING: Deleting Workflow Executions in a global Namespace removes them from\nall replicas. Requests sent to a passive cluster are forwarded to the active\ncluster by default; to target the passive cluster directly, specify\n`--grpc-meta xdc-redirection=false`.\n\nVisit https://docs.temporal.io/visibility to read more about Search Attributes\nand Query creation. See `temporal batch --help` for a quick reference." + s.Command.Long = "Delete a Workflow Execution and its Event History:\n\n```\ntemporal workflow delete \\\n --workflow-id YourWorkflowId\n```\n\nThe removal executes asynchronously. If the Execution is Running, the Service\nterminates it before deletion.\n\nWARNING: Deleting Workflow Executions in a global Namespace removes them from\nall replicas. Only the Workflow's active cluster accepts the deletion;\nrequests sent to a passive cluster are forwarded there by default.\n\nVisit https://docs.temporal.io/visibility to read more about Search Attributes\nand Query creation. See `temporal batch --help` for a quick reference." } s.Command.Args = cobra.NoArgs s.SingleWorkflowOrBatchOptions.BuildFlags(s.Command.Flags()) diff --git a/internal/temporalcli/commands.workflow.go b/internal/temporalcli/commands.workflow.go index 688bcc082..716fee7fd 100644 --- a/internal/temporalcli/commands.workflow.go +++ b/internal/temporalcli/commands.workflow.go @@ -30,7 +30,7 @@ import ( const metadataQueryName = "__temporal_workflow_metadata" -const workflowDeleteWarning = "WARNING: Deleting Workflow Executions in a global Namespace removes them from all replicas. Requests sent to a passive cluster are forwarded to the active cluster by default; to target the passive cluster directly, specify `--grpc-meta xdc-redirection=false`." +const workflowDeleteWarning = "WARNING: Deleting Workflow Executions in a global Namespace removes them from all replicas. Only the Workflow's active cluster accepts the deletion; requests sent to a passive cluster are forwarded there by default." func (c *TemporalWorkflowCancelCommand) run(cctx *CommandContext, args []string) error { cl, err := dialClient(cctx, &c.Parent.ClientOptions) diff --git a/internal/temporalcli/commands.yaml b/internal/temporalcli/commands.yaml index 48e75db95..ead309395 100644 --- a/internal/temporalcli/commands.yaml +++ b/internal/temporalcli/commands.yaml @@ -4260,9 +4260,8 @@ commands: terminates it before deletion. WARNING: Deleting Workflow Executions in a global Namespace removes them from - all replicas. Requests sent to a passive cluster are forwarded to the active - cluster by default; to target the passive cluster directly, specify - `--grpc-meta xdc-redirection=false`. + all replicas. Only the Workflow's active cluster accepts the deletion; + requests sent to a passive cluster are forwarded there by default. Visit https://docs.temporal.io/visibility to read more about Search Attributes and Query creation. See `temporal batch --help` for a quick reference.