-
Notifications
You must be signed in to change notification settings - Fork 202
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
validate: ignore validation of CDI devices #1241
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rhatdan The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Replaces: #1239 |
Signed-off-by: Giuseppe Scrivano <[email protected]> Signed-off-by: Daniel J Walsh <[email protected]>
@vrothberg @giuseppe PTAL |
I am fine with either version, but before taking a decision it can be helpful to look at some numbers first. I've tried to vendor both versions into Podman, and these are the results I get on Fedora 37 with go1.19.3:
The version at #1239 adds more lines and increases the value of the binary podman compared to this PR, but the increment is minor after the binary is stripped and we don't have to maintain any new code. I don't think we can easily drop the CDI dependency in Podman since there are more features needed there, like loading the device's description. |
Did you look at Buildah size? |
repeating the same check with Buildah, I get:
|
// of the split components fail to pass syntax validation, vendor and | ||
// class are returned as empty, together with the verbatim input as the | ||
// name and an error describing the reason for failure. | ||
func ParseQualifiedName(device string) (string, string, string, error) { |
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.
Name stutters: lint error here.
// If this fails, for instance in the case of unqualified device names, | ||
// ParseDevice returns an empty vendor and class together with name set | ||
// to the verbatim input. | ||
func ParseDevice(device string) (string, string, string) { |
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.
lint error here
Ok lets go with original. |
Signed-off-by: Giuseppe Scrivano [email protected]
Signed-off-by: Daniel J Walsh [email protected]