-
Notifications
You must be signed in to change notification settings - Fork 1.6k
🌱 Add script for checking licenses #2451
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
Conversation
|
Welcome @sanya301! |
|
Hi @sanya301. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
0ae3a4e to
589a203
Compare
|
The script currently leads to the following files failing the check. @camilamacedo86 let me know if you would like to exclude certain folders from the check, or if we need to add licenses to below.
|
|
@sanya301 yes those files need licenses. Thanks! /ok-to-test |
|
Thanks @estroz! Should I just add the same license as this for the suite test files that don't have them? https://github.com/kubernetes-sigs/kubebuilder/blob/master/pkg/plugins/golang/v3/scaffolds/internal/templates/api/group.go#L1 |
|
Yes, with the current year. |
camilamacedo86
left a comment
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.
Thank you for your contribution.
Just a few nits are missing for we get this one merged.
a) See that the mojo is not right. It is not a breaking change for any kb user. Could you please update it with Infra/Tests/Other: 🌱 (:seedling:)
b) Could you please give space at the end of the files?
c) Also, we must ensure that the PR pass in the CI. That means that we need to add here the header/license for all missing cases.
|
|
||
| .PHONY: test | ||
| test: test-unit test-integration test-testdata test-book ## Run the unit and integration tests (used in the CI) | ||
| test: test-unit test-integration test-testdata test-book test-license ## Run the unit and integration tests (used in the CI) |
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.
Could we have a GA /ci job new only for this one to make it easier for us to know when/if fails?
I mean, i new target + GitHub actions?
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.
So do you want a Github actions in addition to the script? I thought we wanted one or the other, otherwise it would be repetitive. It didn't seem like a lot of people were using the github action so I decided to go with the script
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 suggestion would be to call this one only in a GA that does this check.
Not call the test twice at all. That would mean not adding test-license in this target also.
The reason would be to make it easier for contributors to check why/what is falling in the ci.
However, that is just nit. It is passing on the tests now so I am ok with too.
2fb2285 to
4928fad
Compare
camilamacedo86
left a comment
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.
Thank you for the contribution 🥇
For we get this one merged, could you please just squash the commits?
/approved
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: camilamacedo86, sanya301 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 |
4928fad to
422d8b2
Compare
|
/lgtm |
Fixes #1891
Adds a script that iterates through all .go and .sh files and checks if a license exists in the first 4 lines. Similar script to the SDK https://github.com/operator-framework/operator-sdk/blob/master/hack/check-license.sh with some changes.