You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Go test suite is never run with the race detector, in CI or in the Makefile. The operator is concurrent by nature — controller-runtime's caches and work queues, the Syncthing HTTPS API client/server, and the pod-log reader all use goroutines — so a data race can reach main and only manifest as a flaky or corrupted run in the field.
The suite is cheap enough that this is close to free: 14 suites / 656 specs currently finish in about 59 seconds with ginkgo -p.
Proposal
Add -race to the Go test invocation. Two options:
Add -race to the existing Test-operator job (-race on make test, e.g. via TEST_ARGS), which roughly doubles the Go phase from ~1 min to ~2 min. Simplest; keeps a single gate.
Add a separate parallel Test-operator-race job so the primary gate does not slow down, and mark the race job non-blocking until clean. Better if the existing job sits on the critical path of e2e-success.
Because envtest starts a real API server, -race also catches races between the test's direct client writes and the manager's cache — a class of flake that currently shows up as unexplained Unexpected error failures (e.g. the CreateOrUpdateDeleteOnImmutableErr and restic immutable-Job specs, which are version-sensitive today).
Acceptance criteria
CI runs the Go suite with -race.
A data race fails the build (blocking, once the suite is clean).
No change to e2e runtime or matrix.
Runtime cost documented in the workflow comment (~+1 min).
Activity