Skip to content
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

Fix nil handling in NodeGroupForNode wrapper #7334

Merged
merged 1 commit into from
Oct 3, 2024

Conversation

omerap12
Copy link
Member

@omerap12 omerap12 commented Oct 3, 2024

What type of PR is this?

/kind bug

What this PR does / why we need it:

Improves checking for empty cloudprovider.NodeGroup results. Uses reflect.ValueOf().IsNil() to catch both nil interfaces and interfaces holding nil values.

Which issue(s) this PR fixes:

Fixes #7209

Special notes for your reviewer:

Does this PR introduce a user-facing change?

None

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:

None

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. area/cluster-autoscaler labels Oct 3, 2024
@k8s-ci-robot k8s-ci-robot added area/provider/externalgrpc Issues or PRs related to the External gRPC provider size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Oct 3, 2024
Copy link
Member

@dbonfigli dbonfigli left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 3, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dbonfigli, omerap12

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

The pull request process is described 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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 3, 2024
@k8s-ci-robot k8s-ci-robot merged commit 813140e into kubernetes:master Oct 3, 2024
6 checks passed
@Shubham82
Copy link
Contributor

I think we should Backport these changes to the supported previous releases so that the bug will be fixed in their upcoming patch release (#7315)

If it seems good to you then I will raise PRs for it.

@Shubham82
Copy link
Contributor

Shubham82 commented Oct 14, 2024

cc @dbonfigli @omerap12
WDYT?

@dbonfigli
Copy link
Member

The fix was about an example, so not sure if that is so important.

@Shubham82
Copy link
Contributor

@dbonfigli, I thought wrapper.go is part of the externalgrpc cloud provider code, but if it is part of the example there is no need to backport.

Thanks for the information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/cluster-autoscaler area/provider/externalgrpc Issues or PRs related to the External gRPC provider cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] externalgrpc provider wrapper nil pointer exception
4 participants