Skip to content

Fix nightly health reporting by correcting sync token helper usage#17936

Closed
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-nightly-dashboard-health
Closed

Fix nightly health reporting by correcting sync token helper usage#17936
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-nightly-dashboard-health

Conversation

Copilot AI commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Adding or modifying a card/dashboard? Read the Card Development Guide first — it covers required patterns, common pitfalls, and the full file checklist.

New CNCF project card? New cards go in kubestellar/console-marketplace, not this repo. PRs adding new cards here will be redirected.

Use a coding agent. This repo is primarily developed with Claude Code (Opus 4.5/4.6). It knows all codebase patterns (isDemoData, useCardLoadingState, locale strings, DCO). Manual PRs that miss required patterns will be sent back.

📝 Summary of Changes

Nightly health issue creation reported “test output could not be parsed,” but the workflow was failing earlier at web build due to Promise/boolean and Promise/headers type mismatches. This PR restores synchronous token helper usage at affected callsites so the nightly pipeline can reach test/report stages.

  • Root cause
    • Async token helpers were used in sync code paths, producing invalid types (Promise<boolean>, Promise<Record<...>>) in runtime logic and fetch headers.
  • Fix shape
    • Converted token-check and auth-header helper callsites back to sync token access (getStoredAuthTokenSync) in affected modules.

Changes Made

  • Updated demo/token helper usage in web/src/lib/demoMode.ts (isDemoToken, hasRealToken) to return sync booleans
  • Refactored auth header helpers in web/src/hooks/useHelmActions.ts and web/src/hooks/useUsers.ts to return sync header objects
  • Fixed demo-user detection in web/src/hooks/useFeatureRequests.ts to use sync token lookup
  • Added tests for these changes
// Before
async function agentAuthHeaders(): Promise<Record<string, string>> {
  const token = await getStoredAuthToken()
  return token ? { Authorization: `****** } : {}
}

// After
function agentAuthHeaders(): Record<string, string> {
  const token = getStoredAuthTokenSync()
  return token ? { Authorization: `****** } : {}
}

Checklist

Please ensure the following before submitting your PR:

  • I used a coding agent (Claude Code, Copilot, Gemini, or Codex) to generate/review this code
  • I have reviewed the project's contribution guidelines
  • New cards target console-marketplace, not this repo
  • isDemoData is wired correctly (cards show Demo badge when using demo data)
  • I have written unit tests for the changes (if applicable)
  • I have tested the changes locally and ensured they work as expected
  • All commits are signed with DCO (git commit -s)

Screenshots or Logs (if applicable)

N/A (no UI changes)


👀 Reviewer Notes

  • Scope is intentionally narrow: only token/helper callsites implicated by the nightly build failure were changed.
  • No dashboard route logic was modified.

@kubestellar-prow kubestellar-prow Bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. dco-signoff: no Indicates the PR's author has not signed the DCO. labels Jun 12, 2026
@netlify

netlify Bot commented Jun 12, 2026

Copy link
Copy Markdown

Deploy Preview for kubestellarconsole ready!

Name Link
🔨 Latest commit 1ed1276
🔍 Latest deploy log https://app.netlify.com/projects/kubestellarconsole/deploys/6a2ba968f309130008149be5
😎 Deploy Preview https://deploy-preview-17936.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

👋 Hey @Copilot — 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 tier/2-standard ai-generated Pull request generated by AI labels Jun 12, 2026
@kubestellar-prow kubestellar-prow Bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jun 12, 2026
Copilot AI linked an issue Jun 12, 2026 that may be closed by this pull request
@kubestellar-prow

Copy link
Copy Markdown
Contributor

Thanks for your pull request. Before we can look at it, you'll need to add a 'DCO signoff' to your commits.

📝 Please follow instructions in the contributing guide to update your commits with the DCO

Full details of the Developer Certificate of Origin can be found at developercertificate.org.

The list of commits missing DCO signoff:

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@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 ask for approval from clubanderson. 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 size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jun 12, 2026
@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.

Copilot AI changed the title [WIP] Fix 0 failing dashboards in nightly health check Fix nightly health reporting by correcting sync token helper usage Jun 12, 2026
Copilot AI requested a review from clubanderson June 12, 2026 06:43
@kubestellar-prow kubestellar-prow Bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 12, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

PR needs rebase.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@github-actions github-actions Bot added the ai-needs-human AI automation unavailable - needs human intervention label Jun 12, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Status Check

This draft PR appears to be stuck with no progress in the last ~90 minutes (last updated: 2026-06-12T08:04 UTC).

Current status:

  • Build: ⚠️ Partially failing — multiple Playwright tests failing (chromium shards 1–4, Accessibility), Merge Test Reports failed
  • Rebase: ❌ needs-rebase — branch is behind main (flagged by prow at 08:04 UTC)
  • DCO: ❌ dco-signoff: no — 2 commits missing DCO sign-off

Findings

  • PR was opened at 06:24 UTC and last touched at 08:04 UTC (prow bot comment flagging rebase requirement)
  • No fix attempt has been made since the rebase requirement was flagged
  • CI failures are in Playwright E2E tests and accessibility checks — these may or may not be related to the PR changes

Recommended Next Steps

  • A human maintainer should review whether the failing Playwright/accessibility tests are pre-existing failures on main or regressions introduced by this PR
  • The branch needs to be rebased onto main
  • Commits need DCO sign-off (git commit -s)
  • If the test failures are pre-existing and unrelated to this PR's scope, the PR may be viable after rebase + DCO fix

Generated by Stuck Detection Workflow · 139.1 AIC · ⌖ 13 AIC · ⊞ 35.9K ·

@github-actions

Copy link
Copy Markdown
Contributor

Status Check

This draft PR appears stalled — no commits since creation (~5 hours ago, 06:24 UTC).

Current status:

  • Build (Go, fullstack-smoke, pr-check, ts-null-safety): ✅ PASSING
  • Playwright E2E tests (chromium shards 1–4, accessibility): ❌ FAILING
  • Netlify deploy preview: ✅ Ready
  • DCO signoff: ❌ Missing (commits e9c7ae7 and 1ed1276 need Signed-off-by)
  • Base branch: ❌ Needs rebase (needs-rebase label, mergeable_state: dirty)

Blockers preventing merge:

  1. Playwright test failures — All 4 chromium shards and accessibility tests are failing. These may be unrelated to this PR's changes (test suite instability noted in issue 🐛 415 test failure(s) in Coverage Suite run #3730 #17846), but need investigation.
  2. DCO signoff missing — Both commits need Signed-off-by trailer before this can merge.
  3. Needs rebase — Base branch has moved ahead; a rebase is required.

Recommended next steps for a human maintainer:

  • Review the Playwright test failure logs to determine if failures are pre-existing or introduced by this PR.
  • Decide whether to rebase + amend commits with DCO signoff to unblock, or close and re-open via a fresh AI fix cycle.

Generated by Stuck Detection Workflow · 218.3 AIC · ⌖ 12.7 AIC · ⊞ 35.9K ·

@github-actions

Copy link
Copy Markdown
Contributor

Status Check (Follow-Up)

Item: PR #17936 — Fix nightly health reporting by correcting sync token helper usage
Last stuck-detection comment: 2026-06-12T11:28Z (~4h 15m ago)
Last activity: 2026-06-12T11:28Z — no human or commit activity since
Stuck duration: ~9h since PR opened at 06:24 UTC

Current State

Area Status
Build / Go / pr-check ✅ Passing
Playwright E2E tests ❌ Failing (chromium shards 1–4, accessibility)
Netlify deploy ✅ Ready
DCO sign-off ❌ Missing on 2 commits (e9c7ae7, 1ed1276)
Rebase needs-rebase — branch is behind main
Review / LGTM ❌ None

The Playwright failures appear to be from the broader test-suite instability tracked in issue #17846 (57+ pre-existing failures), not from changes in this PR. The functional build checks pass.

Recommended Next Steps

A human maintainer should:

  1. Confirm Playwright failures are pre-existing (unrelated to this PR's sync token changes)
  2. Rebase the branch onto main
  3. Add DCO sign-off to both commits (git commit --amend -s)
  4. If confirmed clean, mark ready for review

Generated by Stuck Detection Workflow · 348.4 AIC · ⌖ 12.7 AIC · ⊞ 35.9K ·

@github-actions

Copy link
Copy Markdown
Contributor

Status Check

This draft PR appears to be stalled and requires human intervention.

Stuck since: 2026-06-12T06:24Z (≈ 11 hours)
Current state: Draft, no recent commits

Blockers identified:

  • needs-rebase — the branch is behind main and must be rebased before CI can pass
  • dco-signoff: no — commits are missing the DCO Signed-off-by trailer

Build/Review:

  • Build: failing (needs rebase first)
  • Review: Not approved

Recommended next steps for a human maintainer:

  1. Rebase the branch on latest main
  2. Amend commits to add DCO sign-off (git commit --amend -s)
  3. Force-push and convert from draft when ready for review

Generated by Stuck Detection Workflow · 309.4 AIC · ⌖ 12.7 AIC · ⊞ 35.9K ·

@github-actions

Copy link
Copy Markdown
Contributor

Status Check — Still Stuck (~13 hours)

This draft PR remains stalled since creation with failing test checks.

Current blockers:

  • needs-rebase — branch is behind main
  • dco-signoff: no — commits are missing Signed-off-by trailers (DCO required)
  • Tests: ❌ FAILING — Chromium shards 1–4, Accessibility Tests, Merge Test Reports all failing
  • Not approved — awaiting review

State: Draft · Not merged · ai-needs-human already applied

Recommended next steps: A human maintainer should review this PR and either:

  1. Close it if the fix is superseded or no longer needed, or
  2. Rebase onto main, add DCO sign-off, investigate test failures, and route for review

Note: Current time is outside business hours (UTC). Follow-up when the team is online is fine.

Generated by Stuck Detection Workflow · 195.2 AIC · ⌖ 13 AIC · ⊞ 35.9K ·

@kubestellar-hive

Copy link
Copy Markdown
Contributor

Closing: stale needs-rebase PR with WIP/DCO failures. Per #18190, these have been sitting without progress and should be re-opened with a fresh branch if still needed.

@kubestellar-hive kubestellar-hive Bot closed this Jun 12, 2026
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 ai-needs-human AI automation unavailable - needs human intervention dco-signoff: no Indicates the PR's author has not signed the DCO. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. 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.

[Nightly Health] 0 dashboard(s) failing (2026-06-12)

2 participants