fix(zap-backend): follow zap-proto/http v0.3.0 rename NewTransport -> Dial

go.mod pins github.com/zap-proto/http v0.3.0, which replaced
`NewTransport(addr)` with `Dial(network, addr)` — mirroring net.Dial so the
network is a value ("tcp", "unix") rather than a family of constructors. The
call site was never updated, so the package does not compile:

  pkg/server/service/zap_backend.go:176:15: undefined: zaphttp.NewTransport

This went unnoticed locally because pkg/server/service transitively imports
webui, whose //go:embed static fails before the compiler ever type-checks this
file unless the Vite assets have been built. In a container build the assets
exist, so the Go stage is the first place the breakage surfaces — which is why
it only ever failed in the image build.

Semantics are unchanged: transportFor already keyed one Transport per
"host:port" backend address, which is exactly Dial's tcp case.

Co-authored-by: Hanzo Dev <[email protected]>
This commit is contained in:
2026-07-28 00:27:55 -07:00
co-authored by Hanzo Dev
parent 9fc9a5584e
commit ea3b31ea8b
+1 -1
View File
@@ -173,7 +173,7 @@ func (z *zapBackendRoundTripper) transportFor(addr string) *zaphttp.Transport {
if v, ok := z.transports.Load(addr); ok {
return v.(*zaphttp.Transport)
}
t := zaphttp.NewTransport(addr)
t := zaphttp.Dial("tcp", addr)
actual, _ := z.transports.LoadOrStore(addr, t)
return actual.(*zaphttp.Transport)
}