Skip to content

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

Open
NoicFank wants to merge 1 commit into
gocrane:mainfrom
NoicFank:cleanup-scheduler-node-must-not-nil
Open

cleanup useless null pointer checks for nodeInfo.Node()#52
NoicFank wants to merge 1 commit into
gocrane:mainfrom
NoicFank:cleanup-scheduler-node-must-not-nil

Conversation

@NoicFank

Copy link
Copy Markdown

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
Copy Markdown
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

github-actions Bot commented Oct 20, 2023

Copy link
Copy Markdown

🎉 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

@qmhu qmhu left a comment

Copy link
Copy Markdown
Member

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