Skip to content

ci: build, vet and test this repository - #296

Merged
ander-deran-arteaga merged 1 commit into
devfrom
ci/build-and-test
Sep 8, 2026
Merged

ander-deran-arteaga merged 1 commit into
devfrom
ci/build-and-test

Conversation

@ander-deran-arteaga

Copy link
Copy Markdown
Collaborator

This repository has no CI. Not "no checks on some branches" - no .github/workflows directory, and none anywhere in its history.

Every change to the indexer serving mainnet has merged without being compiled, vetted or tested by anything other than whoever wrote it. That includes #289, #293 and #294, open right now.

The suite could not have run anyway

Thirteen tests in pkg/analyzer build an analyzer against a hardcoded http://localhost:5052 and call t.Errorf when nothing answers. So go test ./... was red on any machine without a beacon node, and CI would have been red from its first minute - which is the surest way to have a job everyone learns to ignore.

A suite that cannot tell an absent prerequisite from a defect is one nobody can run. They take their endpoints from the environment now, defaulting to the local ones, and skip when nothing answers:

GOTETH_TEST_BN_ENDPOINT   beacon node,    default http://localhost:5052
GOTETH_TEST_EL_ENDPOINT   execution node, default http://localhost:8545

That matches what goteth-v4 already does, so the two repositories behave the same way.

I checked the skip is what makes them green rather than an empty stub: turn the t.Skipf into a t.Logf and all thirteen fail again.

Two consequences worth reading

Both preserve existing behaviour rather than change it.

requireNodes returns a pointer, because ChainAnalyzer holds an atomic.Bool and handing back a copy trips vet's copylocks check. I introduced that error and then fixed it; vet was clean before and is clean now.

Several RequestBeaconBlock calls were reusing the builder's err variable without ever reading it. With the builder gone they discard it explicitly instead. Those tests were already ignoring a request error and asserting on the block regardless, which would be a nil dereference if the request failed. I have left that exactly as it was rather than change test semantics in a CI change, but it is worth its own look.

The workflow

Build, vet, go test -race, on pushes to main, master and dev and on every pull request. submodules: recursive, since go.mod replaces go-relay-client with a local path.

All three steps pass on a clean checkout.

Note on branches

It triggers on master and dev both. Those have diverged - dev is 32 commits ahead, master has 13 that dev does not - and this does not attempt to resolve that, only to cover whichever is being worked on.

There was no CI. No .github/workflows directory, and none in the
history. Every change to the indexer serving mainnet merged without
being compiled, vetted or tested by anything but whoever wrote it,
including the three fixes open right now.

The suite could not have run anyway. Thirteen tests in pkg/analyzer
build an analyzer against a hardcoded http://localhost:5052 and call
t.Errorf when nothing answers, so `go test ./...` was red on any machine
without a beacon node. A suite that cannot tell an absent prerequisite
from a defect is one nobody can run, and CI would have been red from its
first minute.

They take their endpoints from GOTETH_TEST_BN_ENDPOINT and
GOTETH_TEST_EL_ENDPOINT now, defaulting to the local ones, and skip when
nothing answers - matching what goteth-v4 already does. Checked that the
skip is what makes them green rather than an empty stub: turn it into a
log and all thirteen fail again.

Two consequences of removing the builder's err, both preserving existing
behaviour rather than changing it. requireNodes returns a pointer,
because ChainAnalyzer holds an atomic.Bool and returning a copy trips
vet's copylocks check. And several RequestBeaconBlock calls were reusing
that err without ever reading it, so they now discard it explicitly.
Those tests were already ignoring a request error and asserting on the
block regardless; that is untouched here and worth its own look.

go build, go vet and go test -race all pass on a clean checkout.
Copilot AI lite review requested due to automatic review settings September 8, 2026 13:29

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@leobago leobago left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM!!

@ander-deran-arteaga
ander-deran-arteaga merged commit 68a754e into dev Sep 8, 2026
1 check passed
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.

3 participants