Repository navigation
fix: raise gavel timeouts and stop deferring telemetry.InitTracer in test setup - #2158
adityathebe wants to merge 3 commits into
Conversation
Gavel's substrate sandbox has 2 CPUs and no Go module or build cache, so each run downloads ~460 MB of modules and compiles from scratch. golangci-lint hit the 5m per-linter default and the test run hit the 20m global default. Raise them to 15m and 45m.
A lint run in gavel's sandbox (2 CPUs, no Go module or build cache) hit the 15m per-linter limit before golangci-lint finished. 40m still fits under the 45m overall timeout and the job's 1h limit.
defer telemetry.InitTracer() deferred the call to InitTracer itself, so the tracer only started when SetupDB or SetupTemplate returned and the shutdown function it returns was discarded. golangci-lint v2.15.0 reports this as staticcheck SA9010 and fails gavel's lint run. Call it at the start of setup instead. The shutdown function is still not called: the tracer must outlive setup for the tests that use the returned context.
Benchstat (Other)Base: ✅ No significant performance changes detectedFull benchstat output |
Benchstat (Scoped reads)Base: ✅ 1 improvement(s)
Full benchstat output |
|
No actionable comments were generated in the recent review. WalkthroughThe Gavel configuration now sets test and lint timeouts. ChangesGavel timeout configuration
Test setup telemetry
Suggested reviewers: Change: Bug fix Merge Risk:
|
Gavel resultsGavel exited with code . |
gavel's sandbox lint and test runs on duty kept failing on timeouts. Once the timeouts were raised, golangci-lint reported two real bugs in the test setup. This raises the timeouts in
.gavel.yamland fixes the bugs; gavel's lint now passes on this branch.Opus 5.5 Medium
Timeouts. gavel's substrate sandbox has 2 CPUs and no Go module or build cache, so every run downloads all modules and compiles from scratch. golangci-lint hit the 5m per-linter default, and later a 15m limit; the test run hit the 20m overall default.
.gavel.yamlnow setstimeout: 45mandlintTimeout: 40m. A lint run on this branch took 22m39s.InitTracer.
tests/setup/common.goandtests/setup/template.gohaddefer telemetry.InitTracer(). That defers the call toInitTraceritself, so the tracer only started whenSetupDBorSetupTemplatereturned, and the shutdown function it returns was discarded (staticcheck SA9010). Both now calltelemetry.InitTracer()at the start of setup. The shutdown function is still not called, because the tracer has to outlive setup for the tests that use the returned context.duty's CI didn't catch this because it pins golangci-lint v2.11.3; gavel downloads v2.15.0. On
./tests/setup/...:Verification:
go build ./tests/setup/and the golangci-lint runs above. gavel's sandbox lint run on 4f0072c succeeded with 0 violations. duty's tests were not run locally.Summary by CodeRabbit