Skip to content

Add namespace move-to-project command - #111

Open
hsadoyan wants to merge 2 commits into
mainfrom
harry/namespace-move-to-project
Open

Add namespace move-to-project command#111
hsadoyan wants to merge 2 commits into
mainfrom
harry/namespace-move-to-project

Conversation

@hsadoyan

@hsadoyan hsadoyan commented Sep 3, 2026

Copy link
Copy Markdown

Moves a namespace to a different project without recreating it, so running workers keep the namespace they are polling.

temporal cloud namespace move-to-project \
  --namespace my-ns.my-account \
  --destination-project-id proj-b \
  --source-project-id proj-a \
  --connectivity-rule-id rule-1

The rule selection is three-way and a repeated string flag cannot express all of it, so --no-connectivity-rules carries the explicit-none case: named ids attach those rules, --no-connectivity-rules asks for none, and omitting both asserts the namespace has no rules to carry over — which the server rejects when it does.

The resource version is read from the namespace unless given. The source project is always explicit; inferring it from the same read would defeat the concurrency check it exists to perform. There is no --idempotent flag — the server returns success for a completed move rather than the rejection that flag translates.

Takes cloud-sdk v0.19.0, which carries the RPC published in cloud-api v0.22.0.

🤖 Generated with Claude Code

@CLAassistant

CLAassistant commented Sep 3, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

hsadoyan and others added 2 commits September 4, 2026 14:36
Picks up MoveNamespaceToProject, published in cloud-api v0.22.0.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Moves a namespace to a different project without recreating it, so
running workers keep the namespace they are polling.

Connectivity rules are project-scoped and must be chosen in the same
call as the project. The selection is three-way and a repeated string
flag cannot express all of it, so --no-connectivity-rules carries the
explicit-none case: named ids attach those rules, --no-connectivity-rules
asks for none, and omitting both asserts the namespace has no rules to
carry over, which the server rejects when it does.

The resource version is read from the namespace unless given, matching
the other namespace commands. The expected source project is always
explicit, since inferring it from the same read would defeat the
concurrency check it exists to perform.

Async surfacing goes through a new Poller.HandleOperation. The existing
handlers each translate one rejection into an "already in the desired
state" message, and the server treats a completed move as a success
rather than rejecting it, so none of those translations apply.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@hsadoyan
hsadoyan force-pushed the harry/namespace-move-to-project branch from cadf249 to 2b2fb21 Compare September 4, 2026 21:41
@hsadoyan
hsadoyan marked this pull request as ready for review September 4, 2026 21:42
@hsadoyan
hsadoyan requested a review from a team as a code owner September 4, 2026 21:42
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.

2 participants