Skip to content

Guard nil MultiClusterClient accessors from scheduler/solver call paths#17482

Closed
Copilot wants to merge 3 commits into
mainfrom
copilot/auto-qa-go-nil-safety-fix
Closed

Guard nil MultiClusterClient accessors from scheduler/solver call paths#17482
Copilot wants to merge 3 commits into
mainfrom
copilot/auto-qa-go-nil-safety-fix

Conversation

Copilot AI commented Jun 11, 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.

📌 Fixes


📝 Summary of Changes

NilAway flagged eight potential nil-pointer paths rooted in scheduler.Dispatch / solver.SolveLoop calling *k8s.MultiClusterClient methods with a nil receiver. This change makes those accessor methods nil-safe and updates focused tests to assert error returns instead of panic behavior.

  • Nil-safety in k8s client accessors

    • Add early nil-receiver guards to GetClient, GetRestConfig, and GetDynamicClient
    • Normalize nil receiver behavior to k8s.ErrNoClusterConfigured
  • Coverage for nil call paths

    • Add direct pkg/k8s tests for nil *MultiClusterClient access
    • Add scheduler coverage verifying Dispatch(..., nil, ...) returns the expected error
  • Behavioral example

    func (m *MultiClusterClient) GetClient(contextName string) (kubernetes.Interface, error) {
        if m == nil {
            return nil, ErrNoClusterConfigured
        }
        // existing logic...
    }

Changes Made

  • Updated pkg/k8s/client_clients.go to guard nil receivers before touching client/config maps
  • Refactored ...
  • Fixed nil-receiver panic paths reported by NilAway in scheduler/solver-driven access
  • Added tests for nil MultiClusterClient accessors and nil scheduler dispatch behavior

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)

Not applicable.


👀 Reviewer Notes

  • Small, targeted fix: no scheduler or solver logic changes beyond converting nil receiver panics into ErrNoClusterConfigured.
  • parallel_validation code review returned no findings; CodeQL timed out.

@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 11, 2026
Copilot AI linked an issue Jun 11, 2026 that may be closed by this pull request
@netlify

netlify Bot commented Jun 11, 2026

Copy link
Copy Markdown

Deploy Preview for kubestellarconsole canceled.

Name Link
🔨 Latest commit beba14c
🔍 Latest deploy log https://app.netlify.com/projects/kubestellarconsole/deploys/6a2a52d4be388c0008aa610d

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

@kubestellar-prow kubestellar-prow Bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jun 11, 2026
@github-actions github-actions Bot added the ai-generated Pull request generated by AI label Jun 11, 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 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/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jun 11, 2026
@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:

  • 87a287a Initial plan
  • a922269 🐛 Guard nil multi-cluster client access
  • beba14c 🌱 Finalize nil-safety validation
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.

Copilot AI changed the title [WIP] Fix potential nil pointer issues in Go code Guard nil MultiClusterClient accessors from scheduler/solver call paths Jun 11, 2026
Copilot AI requested a review from clubanderson June 11, 2026 06:17
@github-actions github-actions Bot added the ai-needs-human AI automation unavailable - needs human intervention label Jun 11, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Requires Human Intervention

Item: PR #17482 — Guard nil MultiClusterClient accessors from scheduler/solver call paths
Stuck since: 2026-06-11T06:17:31Z (~2h45m ago)
Current state: Draft, no activity for over 2 hours during business hours

Findings

  • Build: FAILING on all platforms (ubuntu, macos, windows) and go test ./...
  • pr-check: FAILING
  • DCO: Missing sign-off on 3 commits (87a287a, a922269, beba14c) — prow flagged all three
  • Review: Not yet reviewed, no LGTM/approve
  • No fix attempt has been made since checks completed ~2h40m ago

Failing Checks

Check Result
build (ubuntu-latest) ❌ failure
build (macos-latest) ❌ failure
build (windows-latest) ❌ failure
go test ./... ❌ failure
pr-check ❌ failure

Recommended Next Steps

  • A human maintainer should review the failing build/test output to determine if the nil-safety approach is sound
  • All 3 commits need DCO Signed-off-by: trailers before this PR can merge
  • If the build failures are unrelated to this PR's changes (pre-existing breakage), that should be documented
  • Consider whether to close this PR and reopen after the main build is fixed, or to fix the failures here directly

Generated by Stuck Detection Workflow ·

@github-actions

Copy link
Copy Markdown
Contributor

Status Check (Follow-Up)

Item: PR #17482 — Guard nil MultiClusterClient accessors
No change since last status check (~3.7 hours ago)
Current state: Draft, still stuck

Summary

  • Build: still failing on all platforms
  • DCO: 3 commits missing sign-off (87a287a, a922269, beba14c)
  • Review: no LGTM or approval
  • No new commits or activity since the previous escalation comment at 09:05Z

This PR remains blocked. Human intervention is still required.

Generated by Stuck Detection Workflow ·

@github-actions

Copy link
Copy Markdown
Contributor

Status Check (Follow-Up)

Item: PR #17482 — Guard nil MultiClusterClient accessors from scheduler/solver call paths
No change since last status check (~3 hours ago at 12:51Z)
Total stuck duration: ~9 hours 45 minutes

Current State

Area Status
Build (ubuntu/macos/windows) ❌ Failing
go test ./... ❌ Failing
DCO sign-off ❌ Missing on 3 commits (87a287a, a922269, beba14c)
Review / LGTM ❌ None
Draft → Ready ❌ Still draft

No new commits or activity have occurred since the previous status check. This PR remains blocked and requires human intervention to proceed.

Recommended Next Steps

  • A human maintainer should review the build failure logs to determine the root cause
  • All 3 commits need Signed-off-by: DCO trailers before this PR can merge
  • Consider whether to close this PR and retry with a fresh approach, or fix in place

Generated by Stuck Detection Workflow · 102.1 AIC · ⌖ 12.6 AIC · ⊞ 35.9K ·

@github-actions

Copy link
Copy Markdown
Contributor

Status Check (Follow-Up)

Item: PR #17482 — Guard nil MultiClusterClient accessors from scheduler/solver call paths
No change since last status check (~4 hours ago at 15:55Z)
Total stuck duration: ~13 hours 45 minutes

Current State

Area Status
Build (ubuntu/macos/windows) ❌ Failing
go test ./... ❌ Failing
pr-check ❌ Failing
DCO sign-off ❌ Missing on 3 commits (87a287a, a922269, beba14c)
Review / LGTM ❌ None
Draft → Ready ❌ Still draft

No new commits, no new checks, no human activity since the previous status check. This PR has been blocked for nearly 14 hours with no progress.

Recommended Next Steps

  • A human maintainer should inspect the build failure logs to determine whether failures are pre-existing or caused by this PR's changes
  • All 3 commits need Signed-off-by: DCO trailers before this PR can merge
  • If build failures are pre-existing, note that in the PR and decide whether to advance or close
  • Consider whether to close and reopen after the underlying build issues are resolved

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

@github-actions

Copy link
Copy Markdown
Contributor

Status Check (Follow-Up)

Item: PR #17482 — Guard nil MultiClusterClient accessors from scheduler/solver call paths
No change since last status check (~2h44m ago at 19:57Z)
Total stuck duration: ~16.5 hours

Current State

Area Status
Build (ubuntu/macos/windows) ❌ Failing
go test ./... ❌ Failing
pr-check ❌ Failing
DCO sign-off ❌ Missing on 3 commits (87a287a, a922269, beba14c)
Review / LGTM ❌ None
Draft → Ready ❌ Still draft

No new commits, checks, or human activity since the previous status check. This PR has been blocked for over 16 hours.

Recommended Next Steps

  • A human maintainer should inspect the build failure logs to determine if failures are pre-existing or caused by this PR's changes
  • All 3 commits need Signed-off-by: DCO trailers before this PR can merge
  • Consider whether to close and retry after the main build is healthy, or fix the issues here directly

Generated by Stuck Detection Workflow · 108.2 AIC · ⌖ 12.8 AIC · ⊞ 35.9K ·

@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

Copy link
Copy Markdown
Contributor

Status Check — Still Stalled

Item: PR #17482 — Guard nil MultiClusterClient accessors from scheduler/solver call paths
Last update: 2026-06-12T02:04:10Z (~1h46m ago)
Current state: Draft, build failing, DCO missing on all 3 commits, blocked on needs-rebase

Findings

  • Failing: build (all platforms), go test ./..., pr-check
  • DCO: All 3 commits (87a287a, a922269, beba14c) missing Signed-off-by: trailers
  • Rebase needed: needs-rebase label applied; branch conflicts with HEAD
  • No fix attempt since PR was opened ~21 hours ago
  • First status comment was posted 18+ hours ago with no response

Recommended Next Steps

  1. A human maintainer should decide whether to close this PR or unblock it
  2. If keeping it: rebase the branch, add DCO sign-off to all commits, and verify tests pass
  3. If build failures are pre-existing (unrelated to this PR's changes), document that clearly

Generated by Stuck Detection Workflow · 114.3 AIC · ⌖ 12.8 AIC · ⊞ 35.9K ·

@github-actions

Copy link
Copy Markdown
Contributor

Status Check (Follow-Up)

Item: PR #17482 — Guard nil MultiClusterClient accessors from scheduler/solver call paths
Last stuck-detection comment: 2026-06-12T03:53Z (~8h 46m ago)
Last activity: 2026-06-12T03:53Z (last stuck-detection comment — no human/commit activity since)
Total stuck duration: ~30+ hours

Current State

Area Status
Build (ubuntu/macos/windows) ❌ Failing
go test ./... ❌ Failing
pr-check ❌ Failing
DCO sign-off ❌ Missing on 3 commits (87a287a, a922269, beba14c)
Rebase ❌ Needs rebase (needs-rebase label)
Review / LGTM ❌ None
Draft → Ready ❌ Still draft

This PR has now been blocked for over 30 hours with no commits and no human response to any of the multiple status check comments posted since yesterday. The no-spam window has elapsed again (~8h 46m since last comment).

Recommended Next Steps

  • A human maintainer should decide: close this PR or actively unblock it
  • If keeping it: rebase, add DCO sign-off to all 3 commits, and verify the nil-safety guards are still relevant and compile cleanly
  • If closing: the source issue can be re-triggered once the underlying build health on main is stable

Generated by Stuck Detection Workflow · 174 AIC · ⌖ 13.6 AIC · ⊞ 35.9K ·

@github-actions

Copy link
Copy Markdown
Contributor

Status Check (Follow-Up)

Item: PR #17482 — Guard nil MultiClusterClient accessors from scheduler/solver call paths
Last stuck-detection comment: 2026-06-12T12:43Z (~3h ago)
Last activity: 2026-06-12T12:43Z — no human or commit activity since
Total stuck duration: 33+ hours (opened 2026-06-11T06:08Z)

Current State

Area Status
Build (ubuntu/macos/windows) ❌ Failing
go test ./... ❌ Failing
pr-check ❌ Failing
DCO sign-off ❌ Missing on all 3 commits (87a287a, a922269, beba14c)
Rebase ❌ Needs rebase (needs-rebase label)
Review / LGTM ❌ None

This PR has received multiple status check comments over the past 33+ hours with no response.

Recommended Next Steps

A human maintainer should decide: close this PR or actively unblock it.

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-11T06:08Z (≈ 35 hours — oldest stuck PR)
Current state: Draft, no recent commits

Blockers identified:

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

Build/Review:

  • Build: failing (needs rebase; mergeable_state: unknown)
  • Review: Not approved

Recommended next steps for a human maintainer:

  1. Rebase the branch on latest main (35+ hours of drift)
  2. Amend commits to add DCO sign-off (git commit --amend -s)
  3. Force-push and convert from draft when ready for review
  4. If no longer relevant given recent changes to main, consider closing

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

@github-actions

Copy link
Copy Markdown
Contributor

Status Check — Still Stuck (~37 hours)

This draft PR remains stalled with no progress since creation.

Current blockers:

  • needs-rebase — branch is behind main and must be rebased
  • dco-signoff: no — commits are missing Signed-off-by trailers (DCO required)
  • 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 underlying fix has been superseded, or
  2. Rebase and add DCO sign-off to unblock CI, then 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/M Denotes a PR that changes 30-99 lines, ignoring generated files. tier/2-standard

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Auto-QA] Go nil-safety: 8 potential nil pointer issues

2 participants