kernelci / kernelci-core

Core KernelCI tools
https://kernelci.org
GNU Lesser General Public License v2.1
107 stars 97 forks source link

kernelci/build.py: fix `git_branch_tip` #2734

Closed JenySadadia closed 2 weeks ago

JenySadadia commented 2 weeks ago

Fixes https://github.com/kernelci/kernelci-pipeline/issues/846

Bug: tip_of_branch is always set to False. Fix the method by stripping subprocess command output to get the correct value for tip_of_branch.

JenySadadia commented 2 weeks ago

Tested OK locally for pending-fixes branch:

{"id":"672a0ca3dbc8ee69dcc2a96e","kind":"checkout","name":"checkout","path":["checkout"],"group":null,"parent":null,"state":"available","result":null,"artifacts":{"tarball":"http://172.17.0.1:8002/linux-next-pending-fixes-v6.12-rc6-192-g566383b19a74.tar.gz"},"data":{"kernel_revision":{"tree":"next","url":"https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git","branch":"pending-fixes","commit":"566383b19a74825da16da3b567303cb0536411d0","describe":"v6.12-rc6-192-g566383b19a74","version":{"version":6,"patchlevel":12,"extra":"-rc6-192-g566383b19a74"},"commit_tags":[],"commit_message":"Merge branch 'for-linux-next-fixes' of https://gitlab.freedesktop.org/drm/misc/kernel.git","tip_of_branch":true}},"debug":null,"jobfilter":null,"platform_filter":[],"created":"2024-11-05T12:16:35.932000","updated":"2024-11-05T12:17:19.482000","timeout":"2024-11-05T15:16:35.925000","holdoff":"2024-11-05T12:27:19.470000","owner":"test","submitter":"user:test@gmail.com","treeid":"64d3c4a2c7cb6af96a3ad00855bac31a07de2cf4e207ad371352a687147e1bef","user_groups":[]}

Let's wait for staging results.

nuclearcat commented 2 weeks ago

Works. I did 2 custom checkouts, one with tipoftree, another some commit before. It worked: https://staging.kernelci.org:9000/viewer?node_id=672a0fb419783bdeefcfff51 https://staging.kernelci.org:9000/viewer?node_id=672a0fac19783bdeefcfff47