Skip to content

Commit 5a1877f

Browse files
committed
(docs) Document issues command
Signed-off-by: Arisu Tachibana <[email protected]>
1 parent 35c3eb7 commit 5a1877f

File tree

1 file changed

+161
-0
lines changed

1 file changed

+161
-0
lines changed

docs/issues.md

Lines changed: 161 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,161 @@
1+
# `kci-dev issues detect` — KCIDB Issue Fetcher
2+
3+
Fetch KernelCI Database (KCIDB) issues associated with **builds** and **boots**, and detect **new issues** (first‑time observations) for a specific checkout.
4+
5+
---
6+
7+
## Synopsis
8+
9+
```bash
10+
kci-dev issues detect [--builds | --boots | --new]
11+
[--id <build-or-boot-id>]
12+
[--all-checkouts]
13+
[--days <N>] [--arch <ARCH>] [--origin <ORIGIN>] [--latest]
14+
[--giturl <URL> --branch <BRANCH> --commit <COMMIT>]
15+
[--git-folder <PATH>]
16+
```
17+
18+
> Use one operating mode at a time: `--builds`, `--boots`, or `--new`.
19+
20+
---
21+
22+
## Description
23+
24+
* **Build/boot issue fetch**: Retrieve KCIDB issues linked to a specific build/boot (`--id`) or across *all available trees* on the dashboard (`--all-checkouts`).
25+
* **New‑issue detection**: Identify issues **observed for the first time** for a checkout (defined by `--giturl/--branch/--commit`, or discovered via `--git-folder`).
26+
* **Scope control**: Restrict queries by architecture, time window, result recency, and data origin. Default origin is `maestro`.
27+
28+
`--all-checkouts` targets **failed** and **inconclusive** builds/boots across the dashboard, limited by the `--days` window.
29+
30+
---
31+
32+
## Common Workflows
33+
34+
### Detect build issues for a specific build ID
35+
36+
```bash
37+
kci-dev issues detect --builds --id <build-id>
38+
```
39+
40+
### Detect build issues across all checkouts (recent window)
41+
42+
```bash
43+
kci-dev issues detect --builds --all-checkouts --days 7 --origin maestro
44+
```
45+
46+
### Detect boot issues for a specific boot ID
47+
48+
```bash
49+
kci-dev issues detect --boots --id <boot-id>
50+
```
51+
52+
### Detect boot issues across all checkouts (recent window)
53+
54+
```bash
55+
kci-dev issues detect --boots --all-checkouts --days 14 --origin maestro
56+
```
57+
58+
### Detect **new** issues for a checkout (dashboard scan)
59+
60+
```bash
61+
kci-dev issues detect --new --all-checkouts --days 7 --origin maestro
62+
```
63+
64+
### Detect **new** issues for an explicit checkout (git tuple)
65+
66+
```bash
67+
kci-dev issues detect --new \
68+
--giturl https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git \
69+
--branch main \
70+
--commit v6.12 \
71+
--origin maestro
72+
```
73+
74+
### Filter to a specific architecture and pick the latest available results
75+
76+
```bash
77+
kci-dev issues detect --builds --all-checkouts --arch arm64 --days 3 --latest
78+
```
79+
80+
> The examples above mirror the CLI help and show the intended combinations.
81+
82+
---
83+
84+
## Options
85+
86+
### Mode & Targets
87+
88+
* `--builds`
89+
Fetch KCIDB issues for **builds**.
90+
* `--boots`
91+
Fetch KCIDB issues for **boots**.
92+
* `--new`
93+
Detect **new** KCIDB issues (first‑time observations) for a checkout.
94+
* `--id <build-or-boot-id>`
95+
Retrieve issues for a **single** build/boot. Use with `--builds` or `--boots`.
96+
97+
### Dashboard Scope
98+
99+
* `--all-checkouts`
100+
Fetch issues for **all failed/inconclusive** builds/boots across **all available trees** on the dashboard (bounded by `--days`).
101+
* `--days <N>` *(int, default: 7)*
102+
Time window (in days) to consider when scanning dashboard results.
103+
* `--origin <ORIGIN>` *(default: `maestro`)*
104+
KCIDB origin to query.
105+
* `--arch <ARCH>`
106+
Filter results by architecture (e.g., `arm64`, `x86_64`).
107+
* `--latest`
108+
Select the **latest** results available within the query.
109+
110+
### Checkout Specification (for `--new`)
111+
112+
Provide the checkout explicitly **or** let the tool infer it from a local repo.
113+
114+
* `--giturl <URL>`
115+
Git URL of the kernel tree.
116+
* `--branch <BRANCH>`
117+
Branch to evaluate.
118+
* `--commit <COMMIT>`
119+
Commit SHA or tag (e.g., `v6.12`).
120+
* `--git-folder <PATH>`
121+
Path to a local **git repository**. Must exist and be a directory. When provided, the tool may derive `giturl/branch/commit` from the local checkout.
122+
123+
---
124+
125+
## Behavior Notes
126+
127+
* **Choose a mode**: Use one of `--builds`, `--boots`, or `--new` depending on your task.
128+
* **Single item vs. dashboard scan**:
129+
130+
* Use `--id` for a single build/boot.
131+
* Use `--all-checkouts` (optionally with `--arch`, `--days`, `--latest`) to sweep across dashboards.
132+
* **New‑issue detection** focuses on first occurrences relative to a checkout tuple (`giturl`, `branch`, `commit`). If only `--git-folder` is given, the tool attempts to infer the tuple.
133+
* **Defaults**: `--origin maestro`, `--days 7`.
134+
135+
---
136+
137+
## Examples (from CLI help)
138+
139+
```bash
140+
# Detect build issues
141+
kci-dev issues detect --builds --id <build-id>
142+
kci-dev issues detect --builds --all-checkouts --days <number-of-days> --origin <origin>
143+
144+
# Detect boot issues
145+
kci-dev issues detect --boots --id <boot-id>
146+
kci-dev issues detect --boots --all-checkouts --days <number-of-days> --origin <origin>
147+
148+
# Detect new issues for a checkout
149+
kci-dev issues detect --new --all-checkouts --days <number-of-days> --origin <origin>
150+
kci-dev issues detect --new --giturl <git-url> --branch <git-branch> --commit <commit> --origin <origin>
151+
```
152+
153+
---
154+
155+
## Troubleshooting
156+
157+
* **No results**: Check your `--days` window, `--origin`, and that the target builds/boots are *failed* or *inconclusive* when using `--all-checkouts`.
158+
* **Checkout not resolved**: When using `--new`, ensure the `--giturl/--branch/--commit` tuple is provided, or pass `--git-folder` that points to a valid git repo.
159+
* **Architecture filter too narrow**: Try removing `--arch` or broadening it.
160+
161+
---

0 commit comments

Comments
 (0)