Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Implement STATUS #121
base: main
Are you sure you want to change the base?
Implement STATUS #121
Changes from all commits
a45b44a
7afa42f
a7839ab
1d06125
b110ac0
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fake configuration that is being generated, is that 1.1.0? Can you verify that I don't think the Status verb is actually being executed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MikeZappa87 Thanks for the comment, just want to make sure I understand everything -- In the approach currently taken by this PR, StatusDetail isn't called anywhere yet (the proposal was to have containerd call it), so you're right that the Status verb isn't executed unless we explicitly call StatusDetail. Since we do call StatusDetail in the test here, I think this line https://github.com/containerd/go-cni/pull/121/files#diff-6cdf85f441267859d068399676e5f0ad8946811bd7e951b4e80db98d9fd2489cR318 asserts that the (mocked) status verb is being executed.
I don't see 1.1.0 specified anywhere in the fake config, but I think that doesn't affect the test because the version check happens inside cni.GetStatusNetworkList, and this function is mocked out. Is that right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to expose anything else here? Right now all the fields of
Network
are private.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it enough to make
ifName
public?go-cni/namespace.go
Lines 26 to 30 in a45b44a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a consumer of the Status API does making this private or public help? Exposing ifName might be useful especially if we ever begin to support multiple interfaces upstream.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MikeZappa87 The first use case that came to mind was just the error message, like if the kubelet sees that one of the entries of
StatusDetail
has an error, in the log it can reportifName
along with the error. But there are probably other possible use cases I'm not aware of.What about
config
, should we expose the wholeconfig
or just certain fields likeName
,CNIVersion
?