github actions: Use python PR check script - LE-2214#82
github actions: Use python PR check script - LE-2214#82gvrose8192 wants to merge 1 commit intociqlts8_8from
Conversation
jira LE-2214 Obsoletes the old ruby PR check script
| print(s) | ||
| file.write(s) | ||
| file.close() | ||
| return retcode |
There was a problem hiding this comment.
I think retcode is still 0 here (which is success I think), but in the ruby code a non-ciq email address was a failure.
BUT, we are going to have non-ciq authors now, right? so maybe we don't want this check at all?
There was a problem hiding this comment.
Yeah, that will need fixing. It was an assumption that is no longer true.
Edited to state clearly that yes, I'm just returning a pass code on a non-ciq email address.
| first_arg, *argv_in = sys.argv[1:] # Skip script name in sys.argv | ||
|
|
||
| if len(argv_in) < 5: | ||
| print("Not enough arguments: fname, target_branch, source_branch, prj_dir, pull_request, requestor") | ||
| sys.exit() | ||
|
|
||
| fname = str(first_arg) | ||
| fname = "tmp-" + fname | ||
| # print("filename is " + fname) | ||
| target_branch = str(argv_in[0]) | ||
| # print("target branch is " + target_branch) | ||
| source_branch = str(argv_in[1]) | ||
| # print("source branch is " + source_branch) | ||
| prj_dir = str(argv_in[2]) | ||
| # print("project dir is " + prj_dir) | ||
| pullreq = str(argv_in[3]) | ||
| # print("pull request is " + pullreq) | ||
| requestor = str(argv_in[4]) |
There was a problem hiding this comment.
This is very bash we could use argparse like so to make sure the switches have what they need.
https://github.com/ctrliq/kernel-src-tree-tools/blob/mainline/ciq-cherry-pick.py#L13-L21
There was a problem hiding this comment.
You'll get no argument from me. 😁 OK, let me fix that up.
| upstream_diffdiff_sha = "" | ||
| upstream_diff = False | ||
|
|
||
| for logline in loglines: |
There was a problem hiding this comment.
I haven't touched this is a while but I'm going to start looking at it again for the curent tiger team I'm on,
What are your thoughts about leveraging this and putting this process-git-request.py into kernel-src-tree-tools and check that repo out along side kernel-src-tree
https://github.com/ctrliq/kernel-tools/blob/master/ciq_helpers.py#L12-L47
| print(f"diffdiff err: " + diff_err) | ||
| retcode = 1 | ||
| file.write("error:\nCommit: " + local_diffdiff_sha + " differs with no upstream tag in commit message\n") | ||
|
|
There was a problem hiding this comment.
If we're going to close the file here before returning we should do the same for consistency ... even though the file is closed when the scope of the object is released
a9eeb8d#diff-675bae9c01428bfeaef67c1d6366e76b5eba0bb631b387036dd57c6ba35b97ddR53
|
I'm going to close this PR request - redo it substantially and then repost when I like it better. |
For 8-bit and 16-bit sign-extention mov instructions, it can use the native instructions ext.w.b and ext.w.h directly, no need to use the temporary t1 register, just remove the redundant operations. Here are the test results: # modprobe test_bpf test_range=81,84 # dmesg -t | tail -5 test_bpf: #81 ALU_MOVSX | BPF_B jited:1 5 PASS test_bpf: #82 ALU_MOVSX | BPF_H jited:1 5 PASS test_bpf: #83 ALU64_MOVSX | BPF_B jited:1 5 PASS test_bpf: #84 ALU64_MOVSX | BPF_H jited:1 5 PASS test_bpf: Summary: 4 PASSED, 0 FAILED, [4/4 JIT'ed] Acked-by: Hengqi Chen <hengqi.chen@gmail.com> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
jira LE-2214
Obsoletes the old ruby PR check script
Drop in replacement for the old ruby coded PR checker. The LE-2214 task has changed underneath us and we no longer are looking for a PR checker that works with forked repos. The current method is to accept a PR from a forked repository and then a CIQ employee will run the PR checker after having vetted the code to make sure it is acceptable - especially making sure that the PR from the forked repo contains no changes to any github actions.
Here's an example run: https://github.com/ctrliq/kernel-src-tree/actions/runs/12836125278
You'll see that the PR checker for this PR failed, because the PR checks are from the target and not the source. Plz ignore that for this PR - I posted the results of this PR checker running above.
And just to reiterate - you can't use a PR checker to check a new PR checker. It's like looking in a mirror of a mirror of a mirror... ad infinitum. :D