Skip to content
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

feat(checkout): Add --watch option #31

Merged
merged 2 commits into from
Oct 15, 2024

Conversation

nuclearcat
Copy link
Member

Watch interactively results of custom checkout, each step, until job is completed.
Example:
./kci-dev.py checkout --giturl https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git --branch master --tipoftree --jobfilter baseline-nfs-arm64-qualcomm --jobfilter kbuild-gcc-12-arm64-chromeos-qualcomm --watch

Output example:
./kci-dev.py checkout --giturl https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git --branch master --tipoftree --jobfilter baseline-nfs-arm64-qualcomm --jobfilter kbuild-gcc-12-arm64-chromeos-qualcomm --watch
api connect: https://staging.kernelci.org:9100/
Retrieving latest commit on tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git branch: master
Commit to checkout: d3d1556696c1a993eec54ac585fe5bf677e07474
OK
Watching for jobs on treeid: ad137d5a009f685d1c9c964897bcc35d552b031c9f542b433908fa1368b95465
Current time: 2024-10-10 14:20:11
Total tree nodes 1 found.
Node 6707b869322a7c560a1a2c69 job checkout State running Result None
Refresh in 30s...Current time: 2024-10-10 14:20:41
Total tree nodes 1 found.
Node 6707b869322a7c560a1a2c69 job checkout State running Result None
Refresh in 30s...Current time: 2024-10-10 14:21:13
Total tree nodes 1 found.
Node 6707b869322a7c560a1a2c69 job checkout State running Result None
Refresh in 30s...Current time: 2024-10-10 14:21:43
Total tree nodes 1 found.
Node 6707b869322a7c560a1a2c69 job checkout State running Result None
Refresh in 30s...Current time: 2024-10-10 14:22:14
Total tree nodes 1 found.
Node 6707b869322a7c560a1a2c69 job checkout State available Result None
Refresh in 30s...Current time: 2024-10-10 14:22:45
Total tree nodes 2 found.
Node 6707b869322a7c560a1a2c69 job checkout State available Result None
Node 6707b8ed322a7c560a1a2dc2 job kbuild-gcc-12-arm64-chromeos-qualcomm State running Result None
...
Refresh in 30s...Current time: 2024-10-10 14:41:22
Total tree nodes 12 found.
Node 6707b869322a7c560a1a2c69 job checkout State closing Result None
Node 6707b8ed322a7c560a1a2dc2 job kbuild-gcc-12-arm64-chromeos-qualcomm State done Result pass
Node 6707bc74322a7c560a1a38f6 job baseline-nfs-arm64-qualcomm State done Result pass
Node 6707bc75322a7c560a1a38f7 job baseline-nfs-arm64-qualcomm State running Result None
Refresh in 30s...Current time: 2024-10-10 14:41:53
Total tree nodes 12 found.
Node 6707b869322a7c560a1a2c69 job checkout State closing Result None
Node 6707b8ed322a7c560a1a2dc2 job kbuild-gcc-12-arm64-chromeos-qualcomm State done Result pass
Node 6707bc74322a7c560a1a38f6 job baseline-nfs-arm64-qualcomm State done Result pass
Node 6707bc75322a7c560a1a38f7 job baseline-nfs-arm64-qualcomm State running Result None
Refresh in 30s...Current time: 2024-10-10 14:42:23
Total tree nodes 12 found.
Node 6707b869322a7c560a1a2c69 job checkout State closing Result None
Node 6707b8ed322a7c560a1a2dc2 job kbuild-gcc-12-arm64-chromeos-qualcomm State done Result pass
Node 6707bc74322a7c560a1a38f6 job baseline-nfs-arm64-qualcomm State done Result pass
Node 6707bc75322a7c560a1a38f7 job baseline-nfs-arm64-qualcomm State running Result None

click.secho(f"Total tree nodes {len(nodes)} found.", fg="green")

# Tricky part in watch is that we might have one item in jobfilter (job, test),
# but it might spawn multiple nodes with same name
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why we might spawn multiple nodes with same name?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For example baseline-nfs-arm64-qualcomm is usually spawned on all available qualcomm platforms (as they share similar kernel config), so it will be two test nodes, one for trogdor-lazor and one for trogdor-kingoftown.
Each one will have individual node. In some cases it is ok (regression might be reproduced on all devices), in other case i am introducing platformfilter parameter soon, where you can limit device type.

@nuclearcat nuclearcat marked this pull request as ready for review October 11, 2024 08:22
Watch interactively results of custom checkout, each step,
until job is completed.
Example:
./kci-dev.py checkout --giturl https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git --branch master --tipoftree --jobfilter baseline-nfs-arm64-qualcomm --jobfilter kbuild-gcc-12-arm64-chromeos-qualcomm --watch

Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
@aliceinwire aliceinwire merged commit 2045fca into kernelci:main Oct 15, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants