temporalio / temporalio/temporal

Unable to use passthrough:/// prefix in temporal operator command

Open
#7,640 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

potential-bug
Dominant language
Go
Stars
23.2k
Forks
1.9k
Avg merge
2d 8h
Merged PRs (30d)
228

Description

Expected Behavior

We are setting up multi-cluster replication in Temporal, which involves configuring clusterMetadata and setting the rpcAddress for each remote cluster. In our setup, we want to explicitly specify the passthrough:/// prefix in the rpcAddress, so the gRPC client uses the passthrough resolver behavior intentionally.

This is a valid gRPC URI format supported by grpc-go, and we expect Temporal to handle addresses with the passthrough:/// prefix in clusterInformation.rpcAddress without issue.

Actual Behavior

When the rpcAddress is set to a value like passthrough:///host:port, operations that use this value — such as temporal operator cluster upsert — it still goes to default dns resolver

We think this is happening because the implementation of CreateRemoteFrontendGRPCConnection uses net.SplitHostPort to extract the hostname from the rpcAddress.
We observed that using the same prefix was working for temporal health command because it was not splitting the URI
Relevant code snippet from Temporal:

hostname, _, err2 := net.SplitHostPort(rpcAddress)
if err2 != nil {
    d.logger.Fatal("Invalid rpcAddress for remote cluster", tag.Error(err2))
}

The net.SplitHostPort function expects a basic host:port format and fails when the address includes a URI-style scheme like passthrough:///.

Steps to Reproduce the Problem

Run temporal operator cluster upsert to connect to the remote cluster using address as passthrough:///host:port

The operation still resolves to default dns

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with CreateRemoteFrontendGRPCConnection and the net.SplitHostPort call described in the issue, then reproduce the behavior with temporal operator cluster upsert using a passthrough:///host:port rpcAddress. Compare this path with the temporal health command, which reportedly preserves the URI, and verify that cluster upsert uses the intended gRPC resolver rather than default DNS.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, grpc
Domain
cli, distributed-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.