-
Notifications
You must be signed in to change notification settings - Fork 10
Add reusable validate kernel commits workflow #649
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
Add reusable validate kernel commits workflow #649
Conversation
45d6630 to
3cc867c
Compare
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.
![]()
I'm looking forward to this, I would like us to use and readdress the comment to make it as readable as possible.
c5b4313
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.
Thanks!
c5b4313 to
93bdcb5
Compare
93bdcb5 to
dc56b8a
Compare
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.
Thanks for the changes
![]()
Converts the upstream-commit-check workflow (from ciqlts9_2) to a reusable workflow that can be referenced from branches. This allows maintaining the workflow definition in one place while using it across many branches. The workflow uses workflow_call trigger and accepts all necessary context from the calling workflow via github context variables. We are renaming the workflow and some of the labels it uses to be more general. In the future, more kernel commit validation will happen in this workflow besides just the upstream fixes check
This causes check_kernel_commits.py to check the kernel's vulns database to ensure the CVEs referenced in the commit are correct, check for missing CVE references, and to add CVE references to suggested upstream bugfixes
Add steps to look for differences between upsteam commits referenced in PR commit and the upsteam change they are backporting. This is accomplished with a customized version of interdiff with fuzzy diffing and the run_interdiff.py helper script. Since the custom fuzzy diffing changes aren't available in upstream patchutils yet this workflow pulls down and builds the custom version.
We are using two scripts from that repo and there will be more. Just clone the whole thing instead of fetching scripts one by one.
We will be reaching into our JIRA to check the state of each commits jira. In this we want to ensure that the target branch matches the defined branch for that product and validate that the CVE ID is also correct for the ticket. It will also check to confirm that the tickets are in progress and have time logged, if either are untrue then it will produce a warning. In the event there are Product or CVE mis matches it will block the PR and request changes.
s/result.txt/ckc_result.txt/g
This keeps all of our PR interaction consistent
We want the return code of our python scripts, not of tee
dc56b8a to
6acca96
Compare
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.
Thanks for all the iteration on this! 🚢
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.
![]()
This started as upstream-commit-check.yml from ciqlts9_2 and then the following changes were made:
The idea with the reusable workflow in main, is that each branch will have a minimal validate-kernel-commits.yml that references the main version. Then, when changes need to be made to the workflow they can be made in one place instead of having to touch every branch. If this works out well, maybe we can move other workflows to this model.
This is an example of what it looks like for a branch workflow to reference this reusable workflow:
bmastbergen@534b3ed