Skip to content

kernel: more agressively sanitize full kernel version#402

Merged
k8s-ci-robot merged 1 commit into
kubernetes-sigs:masterfrom
marquiz:fixes/kernel-version-sanitize
Nov 23, 2020
Merged

kernel: more agressively sanitize full kernel version#402
k8s-ci-robot merged 1 commit into
kubernetes-sigs:masterfrom
marquiz:fixes/kernel-version-sanitize

Conversation

@marquiz

@marquiz marquiz commented Nov 23, 2020

Copy link
Copy Markdown
Contributor

Trim illegal characters from the beginning and end of the kernel version
string. Label values must start and end with an alphanumeric and we want
to have some 'version.full' label, even if a sanitized one.

Fixes #390

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Nov 23, 2020
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Nov 23, 2020
@marquiz

marquiz commented Nov 23, 2020

Copy link
Copy Markdown
Contributor Author

/assign @ArangoGutierrez

@ArangoGutierrez

Copy link
Copy Markdown
Contributor

"agressively" is not a word you want to read on a Monday Morning 😀

@ArangoGutierrez

Copy link
Copy Markdown
Contributor

/retest

@ArangoGutierrez

Copy link
Copy Markdown
Contributor

Prow is not happy :(

@dbaker-arch

dbaker-arch commented Nov 23, 2020

Copy link
Copy Markdown
Contributor

+1

is it too late to add a short comment in the code mentioning that characters at the end of labels have different criteria than characters at the start or middle.

It looks like it'll work; a comment just for future readability.

Comment thread source/kernel/kernel.go
Trim illegal characters from the beginning and end of the kernel version
string. Label values must start and end with an alphanumeric and we want
to have some 'version.full' label, even if a sanitized one.
@marquiz marquiz force-pushed the fixes/kernel-version-sanitize branch from 5496654 to ba4ecfe Compare November 23, 2020 17:04
@marquiz

marquiz commented Nov 23, 2020

Copy link
Copy Markdown
Contributor Author

is it too late to add a short comment in the code mentioning that characters at the end of labels have different criteria than characters at the start or middle.

Of course not. I added a short comment, do you think it's enough?

@dbaker-arch

Copy link
Copy Markdown
Contributor

Of course not. I added a short comment, do you think it's enough?

+1. lgtm.

@ArangoGutierrez ArangoGutierrez left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 23, 2020
@k8s-ci-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ArangoGutierrez, marquiz

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit 9b84512 into kubernetes-sigs:master Nov 23, 2020
@marquiz marquiz deleted the fixes/kernel-version-sanitize branch November 23, 2020 19:47
@marquiz marquiz mentioned this pull request Nov 24, 2020
15 tasks
RenaudWasTaken pushed a commit to NVIDIA/gpu-operator that referenced this pull request Jun 10, 2021
Signed-off-by: Shiva Krishna, Merla <smerla@nvidia.com>
RenaudWasTaken pushed a commit to NVIDIA/gpu-operator that referenced this pull request Jun 10, 2021
Update NFD to v0.8.2 to fix: kubernetes-sigs/node-feature-discovery#402

See merge request nvidia/kubernetes/gpu-operator!239
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Regex fails for kernel-version.full on Raspberry Pi nodes

4 participants