fix(test): repair flap-state call arity that broke main's go vet (merge-skew) - #320
Merged
Conversation
…merge-skew) storeFlapState/loadFlapState gained a `generation int64` param, but the telemetry-gap tests (#292) merged with the old 3-/2-arg calls, so `go vet ./...` — and every PR's Unit/Race/E2E, which all compile the test package — fails on main. Pass nsObj.Generation at all four call sites, matching the store/load generation-staleness contract and the production callers (ns.Generation). go vet clean; full controller suite green. This is why several open PRs show all-red CI: they merge a main whose tests do not compile.
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.
main is currently red — this unblocks it
go vet ./...fails onmain, so every open PR'sUnit + envtest,Race detector, andE2E on Kind(all of which compile the test package) go red regardless of the PR's own content:Root cause — a merge-skew
storeFlapState/loadFlapStategained ageneration int64parameter (for generation-scoped anti-flap staleness), and the callers in that PR were updated. But the telemetry-gap coverage tests (#292,ntnslice_satread_test.go) were branched off an oldermainwith the old signatures and merged with the stale 3-/2-arg calls. Each PR was green alone; mergedmaindoesn't compile its tests. (go build ./...doesn't catch it — it skips_test.go; onlygo vet/go testcompile them.)Fix
Pass
nsObj.Generationat all four stale call sites (twostoreFlapState, twoloadFlapState), matching the store/load generation contract and the production callers (ns.Generation). Seeding and loading with the same generation keeps the anti-flap state honored, which is what those tests rely on.Verification
go vet ./...clean; fullinternal/controllerenvtest suite green (21.9s);gofmtclean.Merge this before the other open PRs — their CI will keep failing until
main's tests compile again.