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

cleanup useless null pointer checks for nodeInfo.Node() #52

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

Conversation

NoicFank
Copy link

nodeInfo.Node() will never be nil, thus removing those validations.

For k/k, Null pointer check about nodeInfo.Node() from snapshot is removed for in-tree plugins, pls see following PR.

kubernetes/kubernetes#117834

@NoicFank NoicFank changed the title cleanup useless null pointer check in TopologyMatch filter cleanup useless null pointer checks in some filters Oct 20, 2023
@NoicFank NoicFank force-pushed the cleanup-scheduler-node-must-not-nil branch from 5165772 to 3cc88df Compare October 20, 2023 06:59
@NoicFank
Copy link
Author

/assign @qmhu

@NoicFank NoicFank changed the title cleanup useless null pointer checks in some filters cleanup useless null pointer checks for nodeInfo.Node() Oct 20, 2023
@github-actions
Copy link

github-actions bot commented Oct 20, 2023

🎉 Successfully Build Images.
Now Support ARM Platforms.
Comment Post Time(CST): 2023-10-20 15:33
Git Version: 3cc88df

Docker Registry

Overview: https://hub.docker.com/u/gocrane

Image Pull Command
crane-scheduler:pr-52-3cc88df docker pull gocrane/crane-scheduler:pr-52-3cc88df
crane-scheduler-controller:pr-52-3cc88df docker pull gocrane/crane-scheduler-controller:pr-52-3cc88df

Coding Registry

Overview: https://finops.coding.net/public-artifacts/gocrane/crane/packages

Image Pull Command
crane-scheduler:pr-52-3cc88df docker pull finops-docker.pkg.coding.net/gocrane/crane/crane-scheduler:pr-52-3cc88df
crane-scheduler-controller:pr-52-3cc88df docker pull finops-docker.pkg.coding.net/gocrane/crane/crane-scheduler-controller:pr-52-3cc88df

Ghcr Registry

Overview: https://github.com/orgs/gocrane/packages?repo_name=crane

Image Pull Command
crane-scheduler:pr-52-3cc88df docker pull ghcr.io/gocrane/crane/crane-scheduler:pr-52-3cc88df
crane-scheduler-controller:pr-52-3cc88df docker pull ghcr.io/gocrane/crane/crane-scheduler-controller:pr-52-3cc88df

Copy link
Member

@qmhu qmhu left a comment

Choose a reason for hiding this comment

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

I think NPE checking is just fine here.

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

Successfully merging this pull request may close these issues.

2 participants