Skip to content

[translation]: Answer ListNamespaces from CloudService.GetNamespaces - #153

Open
Vaughan-Temporal wants to merge 1 commit into
vaughan/translation-libraryfrom
vaughan/translation-listnamespaces
Open

[translation]: Answer ListNamespaces from CloudService.GetNamespaces#153
Vaughan-Temporal wants to merge 1 commit into
vaughan/translation-libraryfrom
vaughan/translation-listnamespaces

Conversation

@Vaughan-Temporal

@Vaughan-Temporal Vaughan-Temporal commented Sep 4, 2026

Copy link
Copy Markdown

Stacked on #152. Review that first; this diff is only the mapping.

WorkflowService.ListNamespaces cannot be called on Temporal Cloud on any endpoint. Cloud pins a request's namespace to
the endpoint hostname and rejects any request whose body namespace differs; ListNamespacesRequest has no namespace
field, so its body namespace is always empty and the check can never pass. Cloud exposes the same capability as
CloudService.GetNamespaces on saas-api — a different service, different message types, different host.

Registers that translation using the library from #152.

The judgement calls

All the lossy decisions live in namespaces.go and are the thing to review:

  • State. Cloud's eleven ResourceState values fold onto Temporal's three. Computed once so the deleted filter and
    the reported state cannot disagree.
  • Retention. Cloud reports whole days; config is left unset when it reports none, rather than claiming a zero
    retention Cloud never stated.
  • ReplicationConfig deliberately unset. Cloud describes replication as regional replicas, not Temporal clusters.
    Filling it with region ids would have clients read them as cluster names. IsGlobalNamespace is derived from the
    replica count instead.
  • include_deleted has nowhere to go on the Cloud request, so it is applied to the response.
  • No namespace UUID, description or owner email — Cloud has no equivalent, so those stay empty.

Also

temporal-cloud-api-version is required (GetNamespaces fails InvalidArgument without it) and pinned to
cloudclient.DefaultAPIVersion(), so it moves with the module the message types come from.

CloudService is added to the linked service descriptors so the method resolves.

Scope

+482 / −8. Nothing installs the registry yet, so no request is translated. That is #3 in the stack.

⚠️ Not yet verified against a live Cloud account. v0.20.0 for the API version is the most likely thing to be wrong on
first contact.


Stack

PR
1 #152 translation library — mechanism only
2 #153 ListNamespaces → CloudService.GetNamespaces mapping
3 #154 integration — first behaviour change
4 #155 listnamespace example

Merge bottom-up. Each PR targets the one above it, so its diff shows only its own change.

🤖 Generated with Claude Code

WorkflowService.ListNamespaces cannot be called on Temporal Cloud at all. Cloud
pins a request's namespace to the endpoint hostname and rejects any request whose
body namespace differs; ListNamespacesRequest has no namespace field, so its body
namespace is always empty and the check can never pass, on any endpoint. Cloud
exposes the same capability as CloudService.GetNamespaces on saas-api, which
speaks a different service with different message types on a different host.

Register that translation. The request carries page size, clamped to the 1000
Cloud accepts, and the page token, which is opaque and crosses verbatim; the
namespace filter has nowhere to go on the Cloud request and is applied to the
response instead, which is what the response conversion needs the original
request for.

The response rebuilds each Cloud namespace as the DescribeNamespaceResponse
ListNamespaces returns. Only fields Cloud reports are set: it has no namespace
UUID, description, or owner email, and it describes replication as regional
replicas rather than Temporal clusters, so IsGlobalNamespace is derived from the
replica count while ReplicationConfig is left unset rather than filled with
regions a client would read as cluster names. Cloud's eleven resource states fold
onto Temporal's three, computed once so the deleted filter and the reported state
cannot disagree.

The Cloud API version header is required - GetNamespaces fails with
InvalidArgument without it - and is pinned to the version the compiled cloud-sdk
defaults to, since that is the module the message types and their versioned
fields come from.

CloudService is added to the linked service descriptors so the method resolves.
Nothing installs the registry yet, so no request is translated.
@Vaughan-Temporal
Vaughan-Temporal requested review from a team and pseudomuto as code owners September 4, 2026 16:39
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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