Speed up integration test CI by packing the matrix and trimming per-job setup - #4133
Conversation
…ixed cost Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
… rows to ~2 suites Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…x wasmvm archives, unpack the two longest matrix rows Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
|
The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).
|
PR SummaryMedium Risk Overview
14 matrix job display names changed — branch protection may need updates if it keys on individual Reviewed by Cursor Bugbot for commit de70adf. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
CI-only change that packs the integration matrix from 35 to 26 jobs and trims per-job setup; I verified the (env, script) coverage is identical to base and that every documented packing coupling (absolute usei supply in mint_test.yaml/gov_proposal_test.yaml, absolute wasm code counts in state_store_test.yaml, gov's UnbondingTime change vs. the wasm suite's code-0-only assertions, and the spec-only .io/.iox comparison) actually holds. No blockers; two suggestions plus an operational check before merge.
Findings: 0 blocking | 4 non-blocking | 2 posted inline
Blockers
- None at the file/PR level.
Non-blocking
- [suggestion]
set-matrixstill does a full checkout although it only readsintegration-test-matrix.json, and it sits onintegration-tests'needschain. Addingsparse-checkout: .github/workflowsthere applies the same win the PR takes in every other job. - [suggestion] Before merge, confirm the branch-protection ruleset: 14
Integration Test (...)contexts were renamed andprepare-rpcnodeis a new job. If any individual context is required rather than theIntegration Test Checkumbrella, merges will block on contexts that no longer report. - 2 suggestion(s)/nit(s) flagged inline on specific lines.
| # invocations, so this only guarantees a goroutine dump (rather than a | ||
| # job cancel from timeout-minutes) while the row's total stays under | ||
| # timeout-minutes; rows are kept far shorter than that by the packing | ||
| # policy above. |
There was a problem hiding this comment.
[suggestion] Rather than only documenting that JOB_TIMEOUT: 28m no longer guarantees a goroutine dump, consider lowering it. With timeout-minutes: 30, ~2 min of fixed setup, and up to three go test invocations per row, only a hang in the first invocation can still hit the Go timeout; a hang in the second or third gets a GitHub job cancel instead, which is exactly the diagnostic loss this setting exists to prevent. The packing policy directly above caps rows at ~8 min of test time, so something like JOB_TIMEOUT: 10m would restore the dump guarantee for every invocation in every row while still leaving generous slack over the 4–7 min the rows actually take.
There was a problem hiding this comment.
@masih this might make it flakey again as soon as we start adding some new tests
There was a problem hiding this comment.
Correction, I misread the concern above. A fixed JOB_TIMEOUT (28m or 10m) is the wrong shape for packed rows: 28m stops guaranteeing a dump once a row has more than one invocation, and 10m gets flaky as rows grow. Pushed a fix instead: the row gets a 26m budget (ROW_BUDGET_SECONDS) and each go test invocation is started with -timeout = the budget minus elapsed time, so a hang anywhere in the row hits Go's timeout before timeout-minutes cancels the job, regardless of how many suites the row contains.
|
@seidroid review |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4133 +/- ##
==========================================
- Coverage 61.25% 60.25% -1.01%
==========================================
Files 2195 2078 -117
Lines 192497 179013 -13484
==========================================
- Hits 117916 107866 -10050
+ Misses 63092 60812 -2280
+ Partials 11489 10335 -1154
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
CI-only change packing the integration matrix 35→26 jobs and trimming per-job setup; I re-verified that the (env, script) coverage is identical to base and that every state coupling the new row _comments claim actually holds in the code (no usei burn path, no tokenfactory creation fee, .io fixtures compared spec-only). No blockers — one log-grouping suggestion, plus a pre-existing fragility the packing slightly widens.
Findings: 0 blocking | 2 non-blocking | 1 posted inline
Blockers
- None at the file/PR level.
Non-blocking
- None at the file/PR level.
- 1 suggestion(s)/nit(s) flagged inline on specific lines.
- 1 non-blocking pre-existing issue(s) listed below under pre-existing issues.
Pre-existing issues
- [suggestion]
integration_test/mint_module/mint_test.yamlandintegration_test/gov_module/gov_proposal_test.yamlassert an absoluteuseitotal supply (5000000000333333333333).docker/localnode/scripts/step2_genesis.shgives the cluster a 3-day token release schedule, andx/mint/keeper/hooks.gomints333333333333on the first epoch whose UTC date differs fromLastMintDate— so any cluster that lives across a UTC midnight breaks both assertions regardless of what suites run. The new row_comments reason only about suites minting/burning and don't mention this chain-driven mint; packing widens the window between cluster boot and the assertion (Autobahn Gov now runs several minutes in rather than immediately). Asserting a delta against a supply read at row start would make these rows time-independent.
|
Addressing the unrelated flakes in separate PR; that test is flaking on main as well as other open PRs. |
Integration test CI is slower and pricier than it needs to be. Turns out on
ubuntu-largeevery matrix job starts within ~1s of each other, so there's no batching: wall-clock is justprepare-cluster + slowest row, and job count only buys runner-minutes. So the trick is to cut per-job fixed cost, shortenprepare-cluster, and pack rows without making any of them long.Before → after (main vs this branch, all jobs green):
jqdump of every(env, script)pair in the matrix is byte-for-byte the same on main and here.What changed:
ci-free-disk.shskips the ~3.5 minrm -rfwhen/already has ≥CI_FREE_DISK_MIN_GIBfree Every call site states its own threshold: 40 for test jobs, 60 where a job builds images/seid on/(prepare-cluster, execution-specs prepare, release-upgrade, the go-lint hook). Runners boot with ~85 GiB free, so we were burning 3.5 min per job freeing space we never touched, and the check self-heals if the runner image ever shrinks.rpcnodeimage gets its ownprepare-rpcnodejob onubuntu-latest, in parallel withprepare-clusterinstead of on its critical path.prepare-cluster7m20s → 4m38s.libwasmvm*archives (~500 MB of a 950 MB tree) that a linux/amd64 build never links. Checkout 50s → 28s per job.waited separately so a failed pull fails at the pull, not atdocker tag),::group::per script so failures point at the right suite, npm cache, 2s boot polling, skipapt-get jqwhen present.Packing policy now lives in a comment above
set-matrixin the workflow (not in a row_commentthat vanishes with its row): keep rows under ~8 min, suites asserting absolute chain state go first and say so in_comment, destructive rows (kill/wipe/state-sync a validator, disable wasm, upgrades) stay alone. Known couplings are recorded:TestSeiDBStateStoreasserts absolute wasm code counts,TestMintModuleand the Gov burn case assert absoluteuseisupply. Both hold today (fees aren't burned, tokenfactory doesn't burnusei).Two things worth knowing:
go testinvocations, so a fixed 28m-timeoutper invocation no longer beats the 30m job limit. The row now has a 26m budget and each invocation getsJOB_TIMEOUT= whatever is left, so a hang anywhere in the row still ends in a goroutine dump rather than a job cancel, and adding suites to a row doesn't change that.Integration Test (...)check contexts got renamed. If branch protection requires any of them individually rather than theIntegration Test Checkumbrella, the ruleset needs a tweak.Closes PLT-1223.