diff --git a/internal/temporalcli/commands.gen.go b/internal/temporalcli/commands.gen.go index 4985840e1..a19d7f2fb 100644 --- a/internal/temporalcli/commands.gen.go +++ b/internal/temporalcli/commands.gen.go @@ -3820,9 +3820,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: In a global Namespace, deleting a Workflow Execution removes it from\nall clusters and cannot be undone.\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: In a global Namespace, deleting a Workflow Execution removes it from\nall clusters and cannot be undone.\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 e03047714..5e070e325 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: In a global Namespace, deleting a Workflow Execution removes it from all clusters and cannot be undone." func (c *TemporalWorkflowCancelCommand) run(cctx *CommandContext, args []string) error { cl, err := dialClient(cctx, &c.Parent.ClientOptions) diff --git a/internal/temporalcli/commands.workflow_test.go b/internal/temporalcli/commands.workflow_test.go index aedf331f7..81e933a96 100644 --- a/internal/temporalcli/commands.workflow_test.go +++ b/internal/temporalcli/commands.workflow_test.go @@ -178,8 +178,8 @@ func (s *SharedServerSuite) TestWorkflow_Delete_SingleWorkflowRequiresConfirmati ) s.EqualError(res.Err, "user denied confirmation") // Dev-server's default namespace is non-global, so the warning is suppressed. - s.NotContains(res.Stdout.String(), "Deleting Workflow Executions in a global Namespace") - s.NotContains(res.Stderr.String(), "Deleting Workflow Executions in a global Namespace") + s.NotContains(res.Stdout.String(), "removes it from all clusters and cannot be undone") + s.NotContains(res.Stderr.String(), "removes it from all clusters and cannot be undone") } func (s *SharedServerSuite) TestWorkflow_Delete_SingleWorkflowSuccess() { @@ -203,8 +203,8 @@ func (s *SharedServerSuite) TestWorkflow_Delete_SingleWorkflowSuccess() { "--yes", ) s.NoError(res.Err) - s.NotContains(res.Stdout.String(), "Deleting Workflow Executions in a global Namespace") - s.NotContains(res.Stderr.String(), "Deleting Workflow Executions in a global Namespace") + s.NotContains(res.Stdout.String(), "removes it from all clusters and cannot be undone") + s.NotContains(res.Stderr.String(), "removes it from all clusters and cannot be undone") s.Contains(res.Stdout.String(), "Delete workflow succeeded") } @@ -252,8 +252,8 @@ func (s *SharedServerSuite) TestWorkflow_Delete_BatchWorkflowSuccess() { ) s.NoError(res.Err) s.Contains(res.Stdout.String(), "Start batch against workflows matching query") - s.NotContains(res.Stdout.String(), "Deleting Workflow Executions in a global Namespace") - s.NotContains(res.Stderr.String(), "Deleting Workflow Executions in a global Namespace") + s.NotContains(res.Stdout.String(), "removes it from all clusters and cannot be undone") + s.NotContains(res.Stderr.String(), "removes it from all clusters and cannot be undone") // Confirm workflows were deleted s.Eventually(func() bool { diff --git a/internal/temporalcli/commands.yaml b/internal/temporalcli/commands.yaml index 7d67822a2..d7cb2962f 100644 --- a/internal/temporalcli/commands.yaml +++ b/internal/temporalcli/commands.yaml @@ -3641,10 +3641,8 @@ commands: The removal executes asynchronously. If the Execution is Running, the Service 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`. + WARNING: In a global Namespace, deleting a Workflow Execution removes it from + all clusters and cannot be undone. Visit https://docs.temporal.io/visibility to read more about Search Attributes and Query creation. See `temporal batch --help` for a quick reference.