-
Notifications
You must be signed in to change notification settings - Fork 38
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
Support dots in Kind name segment #137
Conversation
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.
Thanks for the contribution @adrianchiris. I don't think I have an issue with this.
@klihub can you recall why dots were not included in device classes when this was initially implemented?
One thing that would also have to be added is that we would have to add a check and an associated test to the requiresV060
function in pkg/cdi/version.go
. This would mean that a lower spec version can be generated if a non-dotted class name is used to ensure better compatibility with our clients.
Ack, thx for the feedback will work on adding the needed check & test |
CDI spec states that dots ('.') are allowed. Add support in parser for this. Signed-off-by: adrianc <adrianc@nvidia.com>
a849f8a
to
94b7d45
Compare
Done. |
I think it was simply considered unnecessary (there was no immediate need for it) and cleaner to only accept dots in the vendor part where it was clearly needed (to allow for DNS-like vendor prefixes). |
I have no strong feelings. I don't see why dots would be necessary or useful in the class part. But you guys have been playing around much more with generating Specs and if you say it is necessary/helpful, then I believe you.
A much simpler alternative would have been to simply update the docs to reflect the implementation, stating that dots are only allowed in the vendor prefix. But as I said, no strong feelings and I'm fine with this. |
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.
I'm ok with this.
Some context on what triggered me to add this: im working on adding support via DRA to network resources for NVIDIA NICs there may be different network device types (e.g SRIOV virtual function[1] and subfunctions[2]) So, i was thinking on how to name them in CDI. as spec allowed dots in name segment this is what I had in mind for the kind string (and its what triggered this PR):
since the first part usually refers to the vendor (at least that what i got from the examples within CDI proj) some alternatives that conform to current implementation (without dot in name segment)
[1] https://en.wikipedia.org/wiki/Single-root_input/output_virtualization |
I discussed this briefly in the COD Working group meeting, and have no objections. This also aligns with what is allowed for Kubernetes Annotations and does provide more flexibility from a user perspective. @adrianchiris as a last update, please add a line to the "Released versions of the spec are available as Git tags." table in Note: In terms of generating the spec, it would be useful to make use of the |
Thanks for bringing this one up for discussion.
Done. updated v0.6.0 entry. LMK if wording is OK |
160473e
to
44371d0
Compare
@elezar Isn't it a backward-incompatible change? If it is we should consider incrementing spec version. |
It is backward incompatible, but we haven't released (tagged) the |
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.
Thanks @adrianchiris.
This looks good now. (Minor formatting suggestion for the spec table).
Update v0.6.0 released versions entry with updated changes. Signed-off-by: adrianc <adrianc@nvidia.com> Co-authored-by: Evan Lezar <evanlezar@gmail.com>
257ec8c
to
19856fb
Compare
CDI spec states that dots ('.') are allowed.
Add support in parser for this.
reference: https://github.com/container-orchestrated-devices/container-device-interface/blob/main/SPEC.md#kind