Skip to content

Add namespace move-to-project command - #111

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

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

Conversation

@hsadoyan

@hsadoyan hsadoyan commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

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
hsadoyan force-pushed the harry/namespace-move-to-project branch from cadf249 to 2b2fb21 Compare September 4, 2026 21:41
@hsadoyan
hsadoyan deployed to integration September 4, 2026 21:42 — with GitHub Actions Active
@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
shakeelrao
shakeelrao previously approved these changes Sep 16, 2026
@hsadoyan
hsadoyan force-pushed the harry/namespace-move-to-project branch from 08bd267 to 9eb2e3f Compare September 17, 2026 17:35
@hsadoyan
hsadoyan changed the base branch from main to harry/go-toolchain-for-gen September 17, 2026 17:35
@hsadoyan
hsadoyan added this pull request to stack #115 September 17, 2026 17:35
Base automatically changed from harry/go-toolchain-for-gen to main September 17, 2026 18:46
@jeri-temporal
jeri-temporal force-pushed the harry/namespace-move-to-project branch from 9eb2e3f to 56ae3b6 Compare September 17, 2026 18:46
Comment thread temporalcloudcli/async/poller.go Outdated
@hsadoyan
hsadoyan force-pushed the harry/namespace-move-to-project branch from 56ae3b6 to 6e82634 Compare September 17, 2026 23:31
@hsadoyan
hsadoyan deployed to integration September 17, 2026 23:32 — with GitHub Actions Active
hsadoyan and others added 3 commits September 17, 2026 16:32
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>
AsyncOperationHandler in the same package tree already declares a
HandleOperation, so the generic name collided across the two async
conventions and read like a shared helper the sibling handlers delegate
to. The new name states what actually distinguishes it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@hsadoyan
hsadoyan force-pushed the harry/namespace-move-to-project branch from 6e82634 to f686952 Compare September 17, 2026 23:32
@hsadoyan
hsadoyan deployed to integration September 17, 2026 23:32 — with GitHub Actions Active
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.

4 participants