CI: Add check for SPDX license headers#242
CI: Add check for SPDX license headers#242grahamwhaley merged 1 commit intokata-containers:masterfrom
Conversation
|
/cc @grahamwhaley. |
cbe2405 to
be93644
Compare
| --exclude="vendor/*" \ | ||
| --exclude="VERSION" \ | ||
| --exclude="*.md" \ | ||
| -EL "\<${pattern}\>" \ |
There was a problem hiding this comment.
This list of excludes works reasonably well, but I wonder if we want to add .pullapprove.yml to it too? We could of course instead add the SPDX header to that file ;)
There was a problem hiding this comment.
what about exclude yml and toml files in general?
There was a problem hiding this comment.
I guess we could, although for example the versions database does have the SPDX tag:
But yes, we'd need to add it to configuration.toml (and probably should ;)
There was a problem hiding this comment.
I vote maybe we should add them if that does not upset any of the relevant processing tools or bots
jcvenegas
left a comment
There was a problem hiding this comment.
lgtm! I would exclude yaml and toml files too
.ci/static-checks.sh
Outdated
| files=$(git diff-tree \ | ||
| --name-only \ | ||
| --no-commit-id \ | ||
| --diff-filter="ACMRUX" \ |
There was a problem hiding this comment.
new to me - went to look it up - still digesting... https://git-scm.com/docs/git-diff-tree#git-diff-tree---diff-filterACDMRTUXB82308203
There was a problem hiding this comment.
Yeah, it's a bit opaque :) I've updated the file to make it a bit clearer ;)
| --exclude="vendor/*" \ | ||
| --exclude="VERSION" \ | ||
| --exclude="*.md" \ | ||
| -EL "\<${pattern}\>" \ |
There was a problem hiding this comment.
what about exclude yml and toml files in general?
23769da to
2e479d4
Compare
grahamwhaley
left a comment
There was a problem hiding this comment.
Even if we are going to fix all the .yaml and other files that are either missing or have a non-SPDX header, I think this will still work fine, so:
lgtm
|
and thanks @jodh-intel for writing that :-) |
Add a check to ensure that all files where possible contain the required SPDX license header. Fixes kata-containers#240. Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2e479d4 to
f5db778
Compare
|
Don't know what happened. The job finished successfully: http://kata-jenkins-ci.westus2.cloudapp.azure.com/job/kata-containers-tests-ubuntu-16-04-PR/325/ |
|
@grahamwhaley - assuming this was a CI hiccup, do you want to merge? |
|
afaict, the CI did pass - at least as well as any other PR. @chavafg , looking at a few of the logs for the 16.04 builds, they seem to have a number of error-ish type lines (around yaml not found and coverage not reported etc.). I wonder if we can make the scripts a little smarter to reduce some of the noise in the future? |
|
It seems that this PR is breaking all CIs. I'm seeing for PRs that do not add any new files. Do we want to block all PRs until the switch is done? |
|
@bergwolf (or anybody) - do you have a link to a PR that has the failing CI so we can have a look? |
|
Ah, I'm afraid the tool did exactly what it was meant to. The bit you did not paste is: From the files in the PR: https://github.com/bergwolf/kata-runtime/blob/6eb92805dd13ba4bd9e37cbe8a48f1b53c363065/virtcontainers/agent.go#L1-L15 See kata-containers/runtime#227 |
|
@grahamwhaley That's what I meant by "block all PRs until the switch is done", because it is now required to update the license header for any PR that touches the improperly licensed files. I think the sequence to move forward is to send separate PRs to fix the license headers and get them merged first, and then merge this PR to make sure new any added files are properly licensed. Right now, it seems that we are merging tests first and catching up with implementations. |
|
And CI for any PR in runtime repo will fail until kata-containers/runtime#227 is fixed. |
|
Well, I understand :-) Yes, we are currently checking any files that are modified as well as newly added.
I favour maybe a combination of 2 and 4, if we cannot do 4 very quickly... I can jump on (4) in a few hours time.... |
|
@grahamwhaley I'm in favor of any option that can unblock other PRs quickly ;) Thanks! |
Add a check to ensure that all files where possible contain the
required SPDX license header.
Fixes #240.
Signed-off-by: James O. D. Hunt james.o.hunt@intel.com