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
{{ message }}
Repository navigation
spire: TestNodeSVIDRedeliveryCountsUnchanged is flaky under --config=race (2 pushes for one redelivered node SVID) — test race or a real wake/tick race in refreshNodeSVID #1018
//agent/internal/spire:spire_test under --config=race failed on PR #1016's second CI run (a CI-only change that does not touch the agent): TestNodeSVIDRedeliveryCountsUnchanged (added by #1011 for #993) failed in run 3 of 3 with "an unchanged node SVID must not push" — 2 pushes instead of 1. The other two runs passed, and #1011's own CI (including race) was green, so this is intermittent.
The assertion that failed is the production invariant, not test plumbing: a byte-identical node SVID redelivered by SPIRE must classify as unchanged and must NOT push a new snapshot generation. Two pushes for one redelivery means that under some interleaving the served-chain comparison in refreshNodeSVID (agent/internal/spire/bridge.go) does not see the first serve before the second delivery is processed — either a test-side race between the fake source's Updated() wake and the initial push completing, or a real one between the wake path and the backstop tick both entering refreshIdentity. If it is the latter, the agent bumps a no-op snapshot on every redelivery race, which is exactly the churn #993's early return exists to avoid.
Ask
Reproduce with bazel test --config=race --runs_per_test=200 //agent/internal/spire:spire_test and decide test-race vs code-race by reading the interleaving (the test must wait for the first push to be observed before delivering the second SVID; the code must serialise wake and tick through one refresh at a time).
Fix whichever it is; keep the test's assertion strength (do not weaken "must not push").
Until fixed, a red race on an unrelated PR with this signature is a re-run, not a finding.
Activity
fix(spire): test race so a redelivered SVID can never push twice (#1018…