Skip to content

Conversation

VivekPratapSingh1334
Copy link

Added a check to ensure that the nodegroup version is not nil before dereferencing it.

What type of PR is this?

/kind bug

What this PR does / why we need it:

This PR adds a nil pointer check for the nodegroup version in the reconcileNodegroupVersion function. This prevents potential runtime panics caused by dereferencing a nil pointer when the nodegroup version is not set during AWSManagedMachinePool reconciliation .

Example: When the nodegroup status in in "CREATE_FAILED" state due to unsupported AWS Launch template in Palette then the nodegroup version is nil and we encounter panic calls.

Which issue(s) this PR fixes:
Fixes https://spectrocloud.atlassian.net/browse/PCP-3797

Upstream fix : kubernetes-sigs#5019

@spectro-prow
Copy link

@VivekPratapSingh1334: The label(s) kind/bug cannot be applied, because the repository doesn't have them

In response to this:

Added a check to ensure that the nodegroup version is not nil before dereferencing it.

What type of PR is this?

/kind bug

What this PR does / why we need it:

This PR adds a nil pointer check for the nodegroup version in the reconcileNodegroupVersion function. This prevents potential runtime panics caused by dereferencing a nil pointer when the nodegroup version is not set during AWSManagedMachinePool reconciliation .

Example: When the nodegroup status in in "CREATE_FAILED" state due to unsupported AWS Launch template in Palette then the nodegroup version is nil and we encounter panic calls.

Which issue(s) this PR fixes:
Fixes https://spectrocloud.atlassian.net/browse/PCP-3797

Upstream fix : kubernetes-sigs#5019

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/test-infra repository.

@spectro-prow
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: AmitSahastra, pavansokkenagaraj, VivekPratapSingh1334
To complete the pull request process, please assign after the PR has been reviewed.
You can assign the PR to them by writing /assign in a comment when ready.

The full list of commands accepted by this bot can be found here.

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

@VivekPratapSingh1334 VivekPratapSingh1334 merged commit 31fe15e into spectro-master Apr 2, 2025
1 check passed
@VivekPratapSingh1334 VivekPratapSingh1334 deleted the PCP-3797 branch April 2, 2025 08:45
@VivekPratapSingh1334 VivekPratapSingh1334 restored the PCP-3797 branch April 4, 2025 10:07
@VivekPratapSingh1334 VivekPratapSingh1334 deleted the PCP-3797 branch April 9, 2025 10:12
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.

4 participants