Skip to content

🐛 [scanner] fix: add nil guards for k8s client in API handlers#18251

Merged
kubestellar-hive[bot] merged 1 commit into
mainfrom
scanner/fix-18246
Jun 13, 2026
Merged

🐛 [scanner] fix: add nil guards for k8s client in API handlers#18251
kubestellar-hive[bot] merged 1 commit into
mainfrom
scanner/fix-18246

Conversation

@kubestellar-hive

Copy link
Copy Markdown
Contributor

Fixes #18246

Adds nil guards for the k8s MultiClusterClient in kagenti provider proxy handlers that were panicking with nil pointer dereferences:

  • handleGetClusterList - guards against nil before calling DeduplicatedClusters
  • handleGetPodList - guards against nil before calling GetPods
  • handleGetEvents - guards against nil before calling GetEvents

All three handlers now return 503 Service Unavailable when the k8s client is not initialized, consistent with the pattern used in other handlers like admission_webhooks.go, lima.go, and crds.go.

…oxy handlers

Signed-off-by: GitHub Copilot <copilot@github.com>
Copilot AI review requested due to automatic review settings June 13, 2026 04:25
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Jun 13, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@netlify

netlify Bot commented Jun 13, 2026

Copy link
Copy Markdown

Deploy Preview for kubestellarconsole ready!

Name Link
🔨 Latest commit e02efc1
🔍 Latest deploy log https://app.netlify.com/projects/kubestellarconsole/deploys/6a2cdbbe93dd5d0008276bc6
😎 Deploy Preview https://deploy-preview-18251.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 @kubestellar-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

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 clubanderson 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 Jun 13, 2026
@kubestellar-prow kubestellar-prow Bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jun 13, 2026
@kubestellar-hive kubestellar-hive Bot merged commit 30e9c53 into main Jun 13, 2026
33 of 40 checks passed
@kubestellar-prow kubestellar-prow Bot deleted the scanner/fix-18246 branch June 13, 2026 04:51
@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

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 dco-signoff: yes Indicates the PR's author has signed the DCO. 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.

[ci-maintainer] Go Tests: widespread failures across pkg/agent, pkg/api, pkg/api/handlers, pkg/mcp, pkg/settings

1 participant