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

Create a Validate pkg #1455

Merged
merged 1 commit into from
Dec 12, 2023

Conversation

ArangoGutierrez
Copy link
Contributor

No description provided.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Nov 8, 2023
Copy link

netlify bot commented Nov 8, 2023

Deploy Preview for kubernetes-sigs-nfd ready!

Name Link
🔨 Latest commit affb93e
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-nfd/deploys/657730ba08a32e0008a30358
😎 Deploy Preview https://deploy-preview-1455--kubernetes-sigs-nfd.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 8, 2023
@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 8, 2023
@ArangoGutierrez ArangoGutierrez force-pushed the validation branch 2 times, most recently from d511a1f to 82bbc05 Compare November 8, 2023 16:55
@ArangoGutierrez
Copy link
Contributor Author

oh I forgot unit tests at master 😓

Copy link
Contributor

@marquiz marquiz left a comment

Choose a reason for hiding this comment

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

Thanks @ArangoGutierrez for the PR. Splitting this out of #1446 makes for a lot easier review. I'd keep this patch validation-only and have the dynamic value expansion of labels inside nfd-master

pkg/apis/nfd/validate/validate.go Outdated Show resolved Hide resolved
pkg/apis/nfd/validate/validate.go Outdated Show resolved Hide resolved
pkg/apis/nfd/validate/validate.go Outdated Show resolved Hide resolved
pkg/apis/nfd/validate/validate.go Outdated Show resolved Hide resolved
pkg/apis/nfd/validate/validate.go Outdated Show resolved Hide resolved
@ArangoGutierrez
Copy link
Contributor Author

@AhmedGrati @marquiz PTAL

Copy link

@AhmedGrati AhmedGrati left a comment

Choose a reason for hiding this comment

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

Nice improvement @ArangoGutierrez!

@ArangoGutierrez
Copy link
Contributor Author

/assign @marquiz

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 24, 2023
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 1, 2023
@ArangoGutierrez
Copy link
Contributor Author

@marquiz @AhmedGrati Rebased, ready for another round

Copy link

@AhmedGrati AhmedGrati left a comment

Choose a reason for hiding this comment

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

@ArangoGutierrez I think it would be a great addition if you can add some unit tests for the validate functions. wdyt?

Copy link

@AhmedGrati AhmedGrati left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for your efforts @ArangoGutierrez!

pkg/apis/nfd/validate/validate.go Outdated Show resolved Hide resolved
pkg/apis/nfd/validate/validate.go Outdated Show resolved Hide resolved
pkg/apis/nfd/validate/validate.go Outdated Show resolved Hide resolved
pkg/apis/nfd/validate/validate.go Outdated Show resolved Hide resolved
pkg/apis/nfd/validate/validate.go Outdated Show resolved Hide resolved
pkg/apis/nfd/validate/validate.go Outdated Show resolved Hide resolved
pkg/apis/nfd/validate/validate.go Outdated Show resolved Hide resolved
pkg/apis/nfd/validate/validate.go Outdated Show resolved Hide resolved
pkg/nfd-master/nfd-master.go Outdated Show resolved Hide resolved
@marquiz
Copy link
Contributor

marquiz commented Dec 8, 2023

Oh, and this, i.e. remove the mention that the default namespaces cannot be denied

Signed-off-by: Carlos Eduardo Arango Gutierrez <eduardoa@nvidia.com>
Copy link
Contributor

@marquiz marquiz left a comment

Choose a reason for hiding this comment

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

Thanks @ArangoGutierrez for the contribution. Looks ready for me
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 12, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 125fa1e7f300f2a0b1e17b1402b6de5ac44d5c1b

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

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

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:
  • OWNERS [ArangoGutierrez,marquiz]

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

@marquiz
Copy link
Contributor

marquiz commented Dec 12, 2023

/retest

Copy link

codecov bot commented Dec 12, 2023

Codecov Report

Merging #1455 (affb93e) into master (bdfef6d) will increase coverage by 0.73%.
Report is 23 commits behind head on master.
The diff coverage is 81.89%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1455      +/-   ##
==========================================
+ Coverage   30.75%   31.49%   +0.73%     
==========================================
  Files          58       59       +1     
  Lines        7550     7621      +71     
==========================================
+ Hits         2322     2400      +78     
+ Misses       4977     4972       -5     
+ Partials      251      249       -2     
Files Coverage Δ
pkg/apis/nfd/validate/validate.go 89.41% <89.41%> (ø)
pkg/nfd-master/nfd-master.go 45.56% <61.29%> (+1.80%) ⬆️

... and 2 files with indirect coverage changes

@k8s-ci-robot k8s-ci-robot merged commit efe5c03 into kubernetes-sigs:master Dec 12, 2023
14 checks passed
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/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants