Skip to content

fix: correct misleading xdc-redirection note in workflow delete warning#1082

Closed
jiechenz wants to merge 1 commit into
mainfrom
jiechenz/fix-delete-warning-text
Closed

fix: correct misleading xdc-redirection note in workflow delete warning#1082
jiechenz wants to merge 1 commit into
mainfrom
jiechenz/fix-delete-warning-text

Conversation

@jiechenz
Copy link
Copy Markdown
Contributor

@jiechenz jiechenz commented Jun 4, 2026

What was changed

Trims the temporal workflow delete warning (added in #1029) — both the runtime message and the command help text — to:

WARNING: In a global Namespace, deleting a Workflow Execution removes it from all clusters and cannot be undone.

The previous wording was removed:

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.

Why?

The removed sentence was misleading in the one command where it was placed:

  • workflow delete calls the frontend DeleteWorkflowExecution, a mutating op. For a global Namespace it must be served by the active cluster.

  • Setting --grpc-meta xdc-redirection=false disables forwarding, so a passive cluster has nowhere to send the request and rejects it:

    failed starting batch operation: Namespace: global-ns is active in cluster: cluster-a,
    while current cluster cluster-b is a standby cluster.
    

So the flag can't produce a "passive-only" delete — it only converts a forwarded success into a local failure. The forwarding/redirection behavior is also generic XDC semantics, not delete-specific, so it doesn't belong pinned to this single command's help. That concept is better documented on docs.temporal.io.

The kept sentence captures the genuinely delete-specific, accurate point: the blast radius (all clusters) and irreversibility.

Checklist

  1. Closes

  2. How was this tested:

make gen regenerated commands.gen.go (no more xdc-redirection references) and:

go test ./internal/temporalcli/ -run 'TestSharedServerSuite/TestWorkflow_Delete' -count=1
ok  github.com/temporalio/cli/internal/temporalcli

Existing delete tests updated to assert against the new warning substring.

  1. Any docs updates needed?

The active/standby request-forwarding (xdc-redirection) behavior would be better explained in the multi-cluster section of docs.temporal.io rather than in CLI help.

🤖 Generated with Claude Code

The workflow delete warning (added in #1029) advised specifying
`--grpc-meta xdc-redirection=false` to "target the passive cluster
directly." For a global Namespace, delete is a mutating operation that
must be served by the active cluster, so disabling redirection makes the
passive cluster reject the request:

  failed starting batch operation: Namespace is active in cluster-a,
  while current cluster cluster-b is a standby cluster.

The flag therefore can't produce a passive-only delete; it only turns a
forwarded success into a local failure. The forwarding behavior is also
generic XDC semantics, not delete-specific, so it doesn't belong pinned
to this one command.

Trim the warning (both the runtime message and the command help) to the
accurate, delete-specific point: deletion in a global Namespace removes
the Execution from all clusters and is irreversible.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jiechenz jiechenz requested a review from a team as a code owner June 4, 2026 23:26
@jiechenz jiechenz marked this pull request as draft June 4, 2026 23:37
@jiechenz jiechenz closed this Jun 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant