[translation]: Answer ListNamespaces from CloudService.GetNamespaces - #153
Open
Vaughan-Temporal wants to merge 1 commit into
Open
[translation]: Answer ListNamespaces from CloudService.GetNamespaces#153Vaughan-Temporal wants to merge 1 commit into
Vaughan-Temporal wants to merge 1 commit into
Conversation
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.
|
|
This was referenced Sep 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WorkflowService.ListNamespacescannot be called on Temporal Cloud on any endpoint. Cloud pins a request's namespace tothe endpoint hostname and rejects any request whose body namespace differs;
ListNamespacesRequesthas no namespacefield, so its body namespace is always empty and the check can never pass. Cloud exposes the same capability as
CloudService.GetNamespacesonsaas-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.goand are the thing to review:ResourceStatevalues fold onto Temporal's three. Computed once so the deleted filter andthe reported state cannot disagree.
configis left unset when it reports none, rather than claiming a zeroretention Cloud never stated.
ReplicationConfigdeliberately unset. Cloud describes replication as regional replicas, not Temporal clusters.Filling it with region ids would have clients read them as cluster names.
IsGlobalNamespaceis derived from thereplica count instead.
include_deletedhas nowhere to go on the Cloud request, so it is applied to the response.Also
temporal-cloud-api-versionis required (GetNamespacesfailsInvalidArgumentwithout it) and pinned tocloudclient.DefaultAPIVersion(), so it moves with the module the message types come from.CloudServiceis 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.
v0.20.0for the API version is the most likely thing to be wrong onfirst contact.
Stack
Merge bottom-up. Each PR targets the one above it, so its diff shows only its own change.
🤖 Generated with Claude Code