Repository navigation
fix: stop unit-test runaway render loops and misreported shard timeouts - #24608
Conversation
- Return a stable t/i18n identity from the react-i18next test mocks (global
setup.ts and both MissionBrowser test files). A fresh t per render re-fired
every effect depending on t; UnifiedStatsSection's custom-block restore then
looped forever, OOMing or hanging nightly shards.
- Remove the empty describe('initPreloadedMeta') in cache.config.test.ts,
which Vitest 5 fails with 'No test found in suite' (covered in
cache-coverage2.test.ts).
- Map a hung-shard timeout in unit-test.sh to exit 1 so run-all-tests.sh no
longer reports it as a suite-wide wall-clock timeout.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
✅ Deploy Preview for kubestellarconsole ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
👋 Hey @hivecommons-hive[bot] — thanks for opening this PR!
This is an automated message. |
✅ Test Coverage CheckAll new source files in this PR have corresponding test files. Checked |
♿ Accessibility Audit (WCAG 2.1 AA)✅ No WCAG 2.1 AA violations detected in audited routes. Powered by axe-core. Target: WCAG 2.1 AA compliance. |
|
Thank you for your contribution! Your PR has been merged. Check out what's new:
Stay connected: Slack #kubestellar-dev | Multi-Cluster Survey |
|
Post-merge build verification passed ✅ Both Go and frontend builds compiled successfully against merge commit |
✅ Post-Merge Verification: passedCommit: |
Closes #24572, Closes #24575.
Root cause
#24576 raised the nightly unit-test cap to 7200s, but the 2026-10-25 nightly (run 40167737860) still reported
⏰ TIMEOUT (4916s) — 120 minute limit exceeded, well under the cap. The suite was not slow. Individual shards were hanging or OOMing:124code, andrun-all-tests.shreports124as a suite-wide wall-clock timeout. Because of that mislabel, the fix so far was to raise the cap.auth.test.tsx) and the 10-22/10-23/10-24 nightlies showFATAL ERROR: Ineffective mark-compacts near heap limit/ workerSIGABRTin the same files (auth, MissionBrowser, useUpgradeStateMachine, UnifiedStatsSection). Hourly coverage shard 5 shows the same thing.react-i18nextmock inweb/src/test/setup.tsbuilt a newton every render. Real react-i18next memoizest. Any effect withtin its deps re-ran on every render.UnifiedStatsSection's[storageKey, t]effect callssetCustomBlocks(JSON.parse(saved))(a new array each time), so tests that seed-blocksloop forever until the heap runs out.cache.config.test.tshad an emptydescribe('initPreloadedMeta'). Vitest 5 fails it withNo test found in suite initPreloadedMetaon every run. The same functions are covered incache-coverage2.test.ts.The Go toolchain part of #24575 (
go.mod requires go >= 1.26.10) was already fixed by #24528. The latest nightly runsGO_VERSION: 1.26.10, and the only failing suite left is unit-test.Changes
web/src/test/setup.ts,MissionBrowser.test.tsx(both):useTranslationnow returns one stable{ t, i18n }object.cache.config.test.ts: removed the empty describe.scripts/unit-test.sh: a shard that hangs before completing now exits1(a test failure) instead of124, so it shows up as a hung shard rather than a fake suite timeout.Not yet fixed / risks
t-dependency loop inauth.test.tsx(clears kc-has-session on 401) oruseUpgradeStateMachine.test.tsx, which also OOM. If the next nightly still shows those files, they need their own follow-up.unit-test.sh's pass check (Errors +[1-9][0-9]* errors) does not match the singularErrors 1 error. That is how worker OOM crashes were reported as passing before 10-23. I left it unchanged here to keep this PR focused.— hive: agent=scanner backend=copilot model=claude-fable-5 copilot=1.0.88