Hosted foundational-store resolution via control-plane registry + TLS for foundational store gRPC + auth-header forwarding.
CI is the failure, not local. go.mod and go.work were bumped to go 1.26.0, but .github/workflows/ci.yml still pins:
matrix:
go-version: [1.25.x]A go 1.26.0 directive cannot be built by a 1.25.x toolchain → go build / go run ./docs/.gitbook/validate.go fail immediately in CI. Locally it builds because this machine has go1.26.0 and the module cache already holds the private deps.
Secondary CI risks (will bite even after the Go bump):
- Private dep
github.com/streamingfast/services-control-plane— CI needsGOPRIVATE/token auth to fetch it. Not configured inci.yml. - protobuf pinned to an unreleased pseudo-version
v1.36.12-0.20260120151049-f2248ac996af(a master snapshot). Fragile; prefer a tagged release. - Container builds rely on
GOWORK=off(Dockerfile + go.work comment) — make sure CI uses the same, sincego.workadds./tests_e2e.
Fix: bump go-version to 1.26.x in ci.yml (and the PR compliance requirement noted in the comment), add GOPRIVATE=github.com/streamingfast/* + auth in CI, pin protobuf to a release tag.
-
service/tier1.go:655—%qchanged to%Tin an error string:bsstream.NewErrInvalidArg("Invalid progress_messages_interval_ms %T (minimum 500)", request.ProgressMessagesIntervalMs)
%Tprints the type (uint32), not the offending value. Regression — revert to%q/%d. Unrelated to PR intent; looks like an accidental find/replace. -
wasm/wasmtime/module.go:100— same%q→%Tswap, onentrypointwhich isnilin that branch. Prints<nil>type, useless. Revert. The message is also self-referential (formats the very thing that's nil) — should name the export, not the func. -
wasm/call.go:351— logs the rawAuthorizationBearer token at Debug:logger.Debug("foundational store get_all authorization", zap.String("authorization", a))
Secret in logs. Redact (length/prefix only) or drop. Present in
DoFoundationalStoreGet; not inDoFoundationalStoreGetFirst(inconsistent). -
wasm/call.go—dauth.FromContext(c.ctx).ToOutgoingGRPCContext(...)assumes auth is always in ctx. If nil → panic. Add a nil guard.
- Connection leak. The
cpFSRegistryClientgrpc.Dialconn is stored on the pipeline but never added tofoundationalClosers(or any shutdown path). Register a closer. context.Background()forGetFoundationStore— drops request deadline, cancellation, tracing, and auth. Usep.ctx(or the request ctx).- No timeout on the registry RPC → can hang the whole render. Wrap with
context.WithTimeout. - Hardcoded
insecure.NewCredentials()for the registry dial, whilefoudational_store/dgrpc.goin this same PR adds TLS support. A hosted control-plane registry almost certainly needs TLS — inconsistent and likely wrong in prod. grpc.Dialis deprecated — usegrpc.NewClient.- Lazy client init without sync —
if p.cpFSRegistryClient == nil { dial }. Fine only ifrenderWasmInputsis strictly single-goroutine per pipeline; otherwise a race. Confirm or guard. @vsplit duplicated as ad-hoc string parsing here and mentioned in two commits — extract a helper, add a test.
:443TLS heuristic runs onrawEndpoint, but for a URL likehttps://host:443none of the scheme branches match andrawEndpointkeeps thehttps://prefix → bad dial target. Tighten: derive host first, then decide TLS.credentials.NewTLS(&tls.Config{})— empty config (noMinVersion). Acceptable default; setMinVersion: tls.VersionTLS12to be safe.
- Many leftover debug logs:
"got cpFSRegistryClient",wasm/wasmtime/state_externs.go"calling DoFoundationalStoreGet"/"DoFoundationalStoreGet called", endpoint-resolution Info logs. Drop or downgrade before merge — these are clearly bisect/debugging artifacts (commit62702e9"add detailed logging"). - Auth-forwarding block is copy-pasted in both
DoFoundationalStoreGet*— extract one helper.
- Duplicate commits:
0e4e7e97&e1a1439e(same message),0c0c1bf4&ccd69172. Plus a barewip. Squash/rebase before merge. go.work.sumgrew +309 lines — expected from the dep bumps, but verify nothing local-path leaked (services-control-planego.work path was adjusted for cross-repo dev per5259f89).
Architecture is reasonable (3-tier resolution: JSON registry → control-plane → identifier fallback, opt-in via HostedStoreRegistryAddress, backward compatible). Blockers before merge: CI Go version, token logging, two %T regressions, registry conn leak + context.Background + TLS. Then strip debug logs and squash.