cluster-api-provider-aws icon indicating copy to clipboard operation
cluster-api-provider-aws copied to clipboard

🐛 fix(nodegroup): add nil pointer check for nodegroup version

Open nueavv opened this issue 1 year ago • 8 comments
trafficstars

Added a check to ensure that the nodegroup version is not nil before dereferencing it. This prevents potential runtime panics due to nil pointer dereference.

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.

Which issue(s) this PR fixes: Fixes #5018

Special notes for your reviewer:

This change is essential to ensure the stability of the reconcileNodegroupVersion function by preventing nil pointer dereference issues.

Checklist:

  • [x] squashed commits
  • [ ] includes documentation
  • [ ] includes emojis
  • [x] adds unit tests
  • [ ] adds or updates e2e tests

Release note:

Fix nil pointer dereference in reconcileNodegroupVersion by adding a check for nodegroup version.

nueavv avatar Jun 13 '24 04:06 nueavv