Skip to content

fix: route cluster data through backend when local agent is suppressed - #24445

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

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

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Closes #24438

Root cause

Live /deployments shows Error loading deployment data — All cluster fetches failed, so data-live-route-state is unavailable. assertLiveRouteStateLoaded correctly flags that state.

Evidence from run 39183415566 (console-live-promote-evidence trace.zip):

  • /health on console-live returns in_cluster: false, no_local_agent: true, and install_method: "binary". The backend uses a kubeconfig that covers 3 CI clusters; it does not use an in-cluster ServiceAccount.
  • So isInClusterMode() is false and isClusterModeBackend() is false. Because the local agent is suppressed, LOCAL_AGENT_HTTP_URL === ''.
  • useCachedDeployments → fetchViaSSE/fetchFromAllClusters → fetchAPI then requests relative SPA routes:
    GET /deployments?cluster=ks-console-ci-{1,2,3} → 200 text/html (index.html). Parsing fails as non-JSON, every cluster fails, and the result is All cluster fetches failed.
  • The page never calls /api/mcp/deployments or /api/mcp/deployments/stream, although the backend serves both.
  • The failure has the same signature in every run back to at least 2026-09-30, so this is not a recent regression.

Fix

isClusterModeBackend() now also returns true when isLocalAgentSuppressed() is set. With no local agent, the Go backend (/api/mcp/*) is the only valid data source. Previously, the agent-routed REST path could only fetch SPA HTML. getClusterFetcher, fetchFromAllClusters, fetchViaSSE and fetchClusters now go through the backend in this configuration, which matches the existing in-cluster behaviour.

I added unit tests in fetcherUtils-coverage.test.ts. I did not run any tests locally; CI will validate.

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

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
@netlify

netlify Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for kubestellarconsole ready!

Name Link
🔨 Latest commit 94dafa9
🔍 Latest deploy log https://app.netlify.com/projects/kubestellarconsole/deploys/6ad5811b7e955c3a581bcccb
😎 Deploy Preview https://deploy-preview-24445.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.

@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 eeshaansa 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

@github-actions github-actions Bot added the ai-generated Pull request generated by AI label Oct 19, 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.

@kubestellar-prow kubestellar-prow Bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Oct 19, 2026
@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 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 and removed dco-signoff: yes Indicates the PR's author has signed the DCO. labels Oct 19, 2026
@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: 53bc970

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

@hivecommons-hive hivecommons-hive Bot added stage/070-fixing Hive-authored PR: CI red, changes requested or needs rebase; a hive agent is fixing it and removed stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 19, 2026
@hivecommons-hive
hivecommons-hive Bot merged commit 3f8bc7d into main Oct 19, 2026
52 of 55 checks passed
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author
Evidence bundle `#2444594dafa9` sha256:fa7e9ced143fdef1a23d4802cf0f5efadadaf298dab0a8f5adaffad57f888203 — download from the dashboard or `hivectl review evidence #24445`.

@kubestellar-prow
kubestellar-prow Bot deleted the scanner/fix-24438 branch October 19, 2026 03:01
@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

@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/070-fixing Hive-authored PR: CI red, changes requested or needs rebase; a hive agent is fixing it labels Oct 19, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Post-merge build verification passed ✅

Both Go and frontend builds compiled successfully against merge commit 3f8bc7d8b10319e5a445c89cc937084b20c19b13.

@github-actions

Copy link
Copy Markdown
Contributor

✅ Post-Merge Verification: passed

Commit: 3f8bc7d8b10319e5a445c89cc937084b20c19b13
Specs run: smoke.spec.ts
Report: https://github.com/kubestellar/console/actions/runs/39192675408

hivecommons-hive Bot added a commit that referenced this pull request Oct 19, 2026
…yload (#24457)

#24445 routes cluster data through the backend when no_local_agent is set,
so /api/mcp/clusters/<name>/health is now requested. The Clusters/Dashboard
e2e mocks matched it as the cluster list, zeroing healthy/node counts in
webkit/firefox nightly.

Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
Co-authored-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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 size/S Denotes a PR that changes 10-29 lines, ignoring generated files. tier/2-standard

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[scanner] Console Live Promote failing 15+ consecutive scheduled runs: live /deployments renders unavailable state (live-core-pages semantic invariant)

0 participants