Skip to content

🐛 fix: stop infinite render loop in useUpgradeStateMachine test (nightly unit-test) - #24675

Merged
hivecommons-hive[bot] merged 1 commit into
mainfrom
scanner/fix-24572
Oct 28, 2026
Merged

hivecommons-hive[bot] merged 1 commit into
mainfrom
scanner/fix-24572

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Closes #24572. Root cause: the last test in useUpgradeStateMachine.test.tsx passed an inline allClusters: [] inside the renderHook callback. That is a new dep every render, and the hook's not-connected branch always calls setVersionState with a fresh object, so it re-rendered forever and grew the worker heap until OOM/SIGABRT (nightly run 40641476424, shard 34 heap OOM right after the last test). #24608 and #24672 fixed i18n mock stability, fake timers and shard exit handling but left this loop. Fix hoists the empty array into a stable const, as the sibling test at line 150 already does.

— hive: agent=scanner backend=copilot model=claude-fable-5 copilot=1.0.88

…o stop render loop

Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Oct 28, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign mikespreitzer for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubestellar-prow kubestellar-prow Bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Oct 28, 2026
@github-actions

Copy link
Copy Markdown
Contributor

👋 Hey @hivecommons-hive[bot] — thanks for opening this PR!

🤖 This project is developed exclusively using AI coding assistants.

Please do not attempt to code anything for this project manually.
All contributions should be authored using an AI coding tool such as:

This ensures consistency in code style, architecture patterns, test coverage,
and commit quality across the entire codebase.


This is an automated message.

@github-actions github-actions Bot added ai-generated Pull request generated by AI tier/1-lightweight labels Oct 28, 2026
@netlify

netlify Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for kubestellarconsole ready!

Name Link
🔨 Latest commit aa1af5b
🔍 Latest deploy log https://app.netlify.com/projects/kubestellarconsole/deploys/6ae1f569826ece1e36fd87e8
😎 Deploy Preview https://deploy-preview-24675.console-deploy-preview.kubestellar.io
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions

Copy link
Copy Markdown
Contributor

✅ Test Coverage Check

All new source files in this PR have corresponding test files.

Checked web/src/hooks/ and web/src/components/ against origin/main.

@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

hive/awaiting-ci: CI pending — sweep will merge when green.


🐝 Hive Agent: scanner | Instance: hosted-kubestellar-console-4vkt | SHA: 2d4c67d4794ff15895b5d7ed1969b8ee5bbf12cc

— hive: agent=scanner backend=copilot model=claude-fable-5 copilot=1.0.88

@github-actions

Copy link
Copy Markdown
Contributor

♿ 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.

@hivecommons-hive hivecommons-hive Bot added author/hive This repository's own hive (the App or one of its agent lanes) authored this PR dco All commits are DCO signed-off stage/050-review-pending Review swarm requested; awaiting a verdict for the current head role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) labels Oct 28, 2026

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified against the tree at head aa1af5b — this looks correct to me.

The loop mechanism is real: with an inline allClusters: [], the array is a new reference every render, so the effect at web/src/hooks/useUpgradeStateMachine.ts:189 (deps [isDemoMode, agentConnected, allClusters]) re-runs each render. Its not-connected branch (useUpgradeStateMachine.ts:100-104) calls setVersionState((prev) => ({ ...prev, fetchCompleted: true })) — a fresh object every time, so React never bails out on identical state and the component re-renders indefinitely.

Hoisting to a stable const noClusters: ClusterInfo[] = [] breaks the cycle, and it matches the existing pattern in the same file (emptyClusters at useUpgradeStateMachine.test.tsx:151). ClusterInfo was already imported (line 5), so the 4-line diff is complete. Test-only change, no production code touched.

— hive: agent=reviewer backend=copilot model=claude-fable-5 copilot=1.0.88

@hivecommons-hive
hivecommons-hive Bot merged commit 2d0bd36 into main Oct 28, 2026
56 of 57 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the scanner/fix-24572 branch October 28, 2026 13:53
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author
Evidence bundle `#24675aa1af5b` sha256:122952ab0ee685c85afd0f1929da16a28c1c3170eadfbee05cb3b22466e1a7da — download from the dashboard or `hivectl review evidence #24675`.

@hivecommons-hive hivecommons-hive Bot removed role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 28, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thank you for your contribution! Your PR has been merged.

Check out what's new:

Stay connected: Slack #kubestellar-dev | Multi-Cluster Survey

@github-actions

Copy link
Copy Markdown
Contributor

Post-merge build verification passed ✅

Both Go and frontend builds compiled successfully against merge commit 2d0bd3661a9c001bdc4f79d867daa3eb0944e42a.

@github-actions

Copy link
Copy Markdown
Contributor

✅ Post-Merge Verification: passed

Commit: 2d0bd3661a9c001bdc4f79d867daa3eb0944e42a
Specs run: smoke.spec.ts
Report: https://github.com/kubestellar/console/actions/runs/40700556846

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-generated Pull request generated by AI author/hive This repository's own hive (the App or one of its agent lanes) authored this PR dco All commits are DCO signed-off dco-signoff: yes Indicates the PR's author has signed the DCO. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. tier/1-lightweight

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Nightly regression: unit-test

0 participants