Skip to content

ateapi: bracket IPv6 atelet addresses when dialing - #785

Open
Yuan Gao (ygao-g) wants to merge 1 commit into
agent-substrate:mainfrom
ygao-g:ateapi-ipv6-dial-atelet
Open

ateapi: bracket IPv6 atelet addresses when dialing#785
Yuan Gao (ygao-g) wants to merge 1 commit into
agent-substrate:mainfrom
ygao-g:ateapi-ipv6-dial-atelet

Conversation

@ygao-g

Copy link
Copy Markdown

Part of #246

ateapi built its atelet dial target by concatenating the pod IP with
":8085", which is wrong for IPv6: the target has to be
[fd00:10:244::7]:8085, not fd00:10:244::7:8085, and net.Dial rejects
the unbracketed form with "too many colons in address". grpc.NewClient
connects lazily, so this surfaced only as Unavailable on every snapshot
and restore RPC, reading as a storage bug rather than a networking one.
Use net.JoinHostPort, which brackets the host only when it is an IPv6
literal.

Also lifts the duplicated 8085 literal into internal/ateletport.Default,
shared by atelet's --port flag and ateapi's dial target; nothing enforced
agreement between the two binaries before.

This is verifiable without an IPv6 cluster — the test asserts the resolved
ClientConn.Target() over a fake pod indexer for v4, v6, and ::1, so it
does not depend on the dual-stack kind work in #246.

  • Tests pass
  • Appropriate changes to documentation are included in the PR

🤖 Generated with Claude Code

@google-cla

google-cla Bot commented Aug 6, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

ateapi built its atelet dial target by concatenating the pod IP with
":8085", which is wrong for IPv6: the target has to be
[fd00:10:244::7]:8085, not fd00:10:244::7:8085, and net.Dial rejects the
unbracketed form with "too many colons in address". grpc.NewClient
connects lazily, so this surfaced only as Unavailable on every snapshot
and restore RPC, reading as a storage bug rather than a networking one.
Use net.JoinHostPort, which brackets the host only when it is an IPv6
literal.

Also lift the duplicated 8085 literal into internal/ateletport.Default,
shared by atelet's --port flag and ateapi's dial target; nothing enforced
agreement between the two binaries before.
@ygao-g
Yuan Gao (ygao-g) force-pushed the ateapi-ipv6-dial-atelet branch from 09874e2 to d4737aa Compare August 6, 2026 19:45
@ygao-g

Copy link
Copy Markdown
Author

Bowei Du (@bowei) haiyanmeng PTAL

// Default is the port atelet's gRPC server listens on: it is the default of
// atelet's --port flag (cmd/atelet/main.go) and the port ateapi dials when
// it connects to an atelet
// (cmd/ateapi/internal/controlapi/dialer.go). It is deliberately untyped so

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please go through your code comments and remove the agent language (extra verbose comments)

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