ateapi: bracket IPv6 atelet addresses when dialing - #785
ateapi: bracket IPv6 atelet addresses when dialing#785Yuan Gao (ygao-g) wants to merge 1 commit into
Conversation
|
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. |
09874e2 to
d4737aa
Compare
ac73cdd to
129f397
Compare
| @@ -0,0 +1,21 @@ | |||
| // Copyright 2026 Google LLC | |||
There was a problem hiding this comment.
put this in internal/atelet
doc.go
// Package atelet contains shared constants and definitions that are used across
// Substrate components related to atelet.
package atelet
Having a package just for port is too narrow.
There was a problem hiding this comment.
Done — moved to internal/atelet with doc.go as suggested; the constant now lives in port.go.
One adjustment: renamed Default → DefaultPort, since atelet.Default doesn't say much once the package isn't port-specific. Call sites read atelet.DefaultPort.
129f397 to
1741c0d
Compare
1741c0d to
d39f207
Compare
The atelet dial target concatenated the pod IP with ":8085", which net.Dial rejects for IPv6; grpc.NewClient dials lazily, so it surfaced as Unavailable on every snapshot and restore. Use net.JoinHostPort. Also lifts the 8085 literal into internal/atelet.DefaultPort, shared by atelet's --port flag and the dial target.
d39f207 to
cd8f3a4
Compare
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, notfd00:10:244::7:8085, andnet.Dialrejectsthe unbracketed form with "too many colons in address".
grpc.NewClientconnects lazily, so this surfaced only as
Unavailableon every snapshotand restore RPC, reading as a storage bug rather than a networking one.
Use
net.JoinHostPort, which brackets the host only when it is an IPv6literal.
Also lifts the duplicated 8085 literal into
internal/ateletport.Default,shared by atelet's
--portflag and ateapi's dial target; nothing enforcedagreement 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 itdoes not depend on the dual-stack kind work in #246.
🤖 Generated with Claude Code