Skip to content

chore: null node list handling #6491

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open

Conversation

iamayushm
Copy link
Contributor

@iamayushm iamayushm commented Apr 2, 2025

Description

instead of null, node list should empty array

Checklist:

  • The title of the PR states what changed and the related issues number (used for the release note).
  • Does this PR requires documentation updates?
  • I've updated documentation as required by this PR.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have tested it for all user roles.
  • I have added all the required unit/api test cases.

Does this PR introduce a user-facing change?


Summary by Bito

This PR fixes an issue in the Kubernetes capacity service by replacing a nil slice with an empty slice initialization. This change prevents potential runtime errors when processing node details and enhances the overall reliability of the service's node handling functionality.

Copy link

sonarqubecloud bot commented Apr 2, 2025

@Shivam-nagar23
Copy link
Member

/review

Copy link

bito-code-review bot commented Jul 15, 2025

Code Review Agent Run #0de45c

Actionable Suggestions - 0
Review Details
  • Files reviewed - 1 · Commit Range: 365bb45..365bb45
    • pkg/k8s/capacity/k8sCapacityService.go
  • Files skipped - 0
  • Tools
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers a full AI review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Default Agent You can customize the agent settings here or contact your Bito workspace admin at [email protected].

Documentation & Help

AI Code Review powered by Bito Logo

Copy link

Changelist by Bito

This pull request implements the following key changes.

Key Change Files Impacted
Bug Fix - Ensure Node List is Properly Initialized

k8sCapacityService.go - Replaced an uninitialized nodeDetails variable with an empty slice to prevent null pointer issues.

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

Successfully merging this pull request may close these issues.

2 participants