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

Instantiate Device Plugin #2979

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

aggarwal0009
Copy link
Contributor

Reason for Change:
This PR enables device plugin

Issue Fixed:

Requirements:

Notes:

@aggarwal0009 aggarwal0009 added cns Related to CNS. swift-v2 labels Aug 29, 2024
@aggarwal0009 aggarwal0009 requested review from a team as code owners August 29, 2024 23:37
cns/service/main.go Outdated Show resolved Hide resolved
cns/service/main.go Show resolved Hide resolved
cns/service/main.go Show resolved Hide resolved
cns/service/main.go Outdated Show resolved Hide resolved
}

// Check if the status is set
if !reflect.DeepEqual(nodeInfo.Status, mtv1alpha1.NodeInfoStatus{}) && len(nodeInfo.Status.DeviceInfos) > 0 {
Copy link
Member

Choose a reason for hiding this comment

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

github.com/google/go-cmp/cmp.Equal is better than reflect.DeepEqual for a lot of reasons. It's a drop-in replacement, and it does the right thing more consistently.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated

Copy link
Member

Choose a reason for hiding this comment

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

I made this recommendation prior to learning that cmp was intended for tests only. Given that the intention here is to test whether this type is a zero value, I believe it should be sufficient to test whether nodeInfo.Status.DeviceInfos != nil && len(nodeInfo.Status.DeviceInfos) > 0. Second opinion might be nice though. @rbtr ?

Copy link

This pull request is stale because it has been open for 2 weeks with no activity. Remove stale label or comment or this will be closed in 7 days

@github-actions github-actions bot added the stale Stale due to inactivity. label Sep 18, 2024
@github-actions github-actions bot removed the stale Stale due to inactivity. label Sep 20, 2024
Copy link

github-actions bot commented Oct 5, 2024

This pull request is stale because it has been open for 2 weeks with no activity. Remove stale label or comment or this will be closed in 7 days

@github-actions github-actions bot added the stale Stale due to inactivity. label Oct 5, 2024
Copy link

Pull request closed due to inactivity.

@github-actions github-actions bot closed this Oct 13, 2024
@github-actions github-actions bot deleted the ankaggar/instantiate_device_plugin branch October 13, 2024 00:01
@aggarwal0009 aggarwal0009 restored the ankaggar/instantiate_device_plugin branch October 16, 2024 16:57
@aggarwal0009 aggarwal0009 reopened this Oct 16, 2024
@github-actions github-actions bot removed the stale Stale due to inactivity. label Oct 17, 2024
@timraymond
Copy link
Member

@aggarwal0009 did not see you had updated this. Please hit the re-review button in the future so I see this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cns Related to CNS. swift-v2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants