feat(snd): redesign status.endpoints — scalars + per-pod Nodes#244
Merged
Conversation
The positional []string-per-protocol shape was asymmetric across kinds
(evmJsonRpc had aggregate+per-pod entries, evmWs had per-pod only,
tendermintRpc/Rest had aggregate only) and silently broke consumers
that tried to pin a single index across protocols. Replace with two
explicit tiers:
type Endpoints struct {
TendermintRpc string // aggregate, stateless
TendermintRest string // aggregate, stateless
Nodes []NodeEndpoint // per-pod, stateful-safe (keyed by name)
}
type NodeEndpoint struct {
Name string
EvmJsonRpc string
EvmWs string
}
Consumer rewrite:
before: jsonpath='{.status.endpoints.evmJsonRpc[1]}'
after: jsonpath='{.status.endpoints.nodes[0].evmJsonRpc}'
The aggregate evmJsonRpc scalar is deliberately omitted: aggregate
EVM JSON-RPC is what triggered the pod-locality bugs the qa-test
harness has been chasing (filter-not-found across pods, receipt
invisible across pods, finalized-tag lag). Surfacing it as a top-level
convenience scalar invites the next consumer to recreate the same
failure mode. Stateless TM RPC/REST keep their aggregate scalars
because kube-proxy round-robin is safe for them.
Nodes is +listType=map +listMapKey=name, mirroring the existing
.status.nodes and .status.perPodServices conventions on the type.
No live consumers; non-additive replace. CRD YAML, deepcopy, and
endpoints_test.go regenerated/updated; build + test + vet green.
|
You have used all Bugbot PR reviews included in your free trial for your GitHub account on this workspace. To continue using Bugbot reviews, enable Bugbot for your team in the Cursor dashboard. |
- MinLength=1 validation on NodeEndpoint.Name: cheap belt-and-suspenders against an empty-string status write (controller is sole writer but a malformed Name would silently break name-keyed list invariants). - Switch composeEndpoints range to value-copy form. PerPodServiceStatus is small enough that index-and-pointer adds no value. Addresses review nits on #244.
|
You have used all Bugbot PR reviews included in your free trial for your GitHub account on this workspace. To continue using Bugbot reviews, enable Bugbot for your team in the Cursor dashboard. |
bdchatham
added a commit
that referenced
this pull request
May 14, 2026
Brings dev + prod inline with the redesigned .status.endpoints shape that #244 introduced. Both clusters consume this manifest via Flux pulling config/default?ref=main; harbor pins its own image via a manager-patch.yaml override and was cut over separately in sei-protocol/platform#534. Pre-cutover requirement on prod: existing SNDs carry .status.endpoints in the OLD shape (tendermintRpc/Rest as []string) which the new controller's typed decoder cannot read. Operator pre-patches each SND status to remove .status.endpoints before merge; new controller repopulates in the new shape on first reconcile. Validated end-to-end on harbor today. Dev has no SNDs; nothing to migrate there.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replace
SeiNodeDeploymentStatus.Endpoints's positional[]string-per-protocol shape with explicit two-tier scalars + per-pod array. The old shape's asymmetric indexing (evmJsonRpchad aggregate+per-pod entries,evmWshad per-pod only,tendermintRpc/Resthad aggregate only) silently broke consumers that tried to pin a single index across protocols.Consumer rewrite:
Why no aggregate
evmJsonRpcscalarThe aggregate EVM JSON-RPC URL is what triggered the pod-locality failures the qa-test harness has been chasing:
sei_newFilterregisters on pod A →sei_getFilterLogslands on pod B → "filter not found";eth_sendRawTransactionlands on pod A's mempool →tx.wait()polling lands on pod B → receipt invisible;finalizedtag returns different heights on different pods. Surfacing the aggregate EVM URL as a friendly top-level scalar would invite the next consumer to recreate the same failure mode. Stateless TM RPC/REST keep their aggregate scalars because kube-proxy round-robin is safe for them. The underlyinginternalServiceService still exposes port 8545 — a consumer that genuinely wants the aggregate ClusterIP EVM URL can build it from.status.internalService.{name,namespace,ports.evmHttp}.Why now / migration
No live consumers — the nightly release-test and nightly-load orchestrators are the only readers of
.status.endpoints.*, and both are getting rewritten in a sibling platform PR. Non-additive replace; no dual-emit window needed.Shape contract
.status.phase == Ready,endpoints.nodesis non-empty and every entry has at leastnameplus its protocol URLs populated.nodesmirrors.status.perPodServicesorder. Consumers can indexnodes[0]for "any one pinned pod" or name-key for pod-N specifically.nodesis+listType=map+listMapKey=name— same convention as the existing.status.nodes(GroupNodeStatus) and.status.perPodServices.Test plan
go build ./...cleango test ./...all green (6 tests inendpoints_test.gocover: nil-empty, TM scalars fromInternalService, Nodes per-pod in order, Nodes order preservation across non-sorted input, transient aggregate-only, transient per-pod-only)go vet ./...cleangolangci-lintclean on touched files (152 pre-existing issues elsewhere, untouched)make generate manifestsregenerates deepcopy + CRD YAML cleanly; diff is the intentional shape change🤖 Generated with Claude Code