You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reads individual job analysis reports produced by `analyze-ci-for-release` or `analyze-ci-for-pull-requests` and creates JIRA bugs in USHIFT for legitimate test failures. Operates in **dry-run mode by default** - it shows what bugs would be created without actually creating them. Use `--create` to perform actual issue creation.
17
17
18
-
This command does NOT re-analyze CI jobs. It consumes existing job analysis files from `/tmp/analyze-ci-claude-workdir/`.
18
+
This command does NOT re-analyze CI jobs. It consumes existing job analysis files from `${WORKDIR}/`.
19
19
20
20
## Arguments
21
21
-`$ARGUMENTS` (required): Source identifier, optionally followed by `--create`
@@ -27,7 +27,7 @@ This command does NOT re-analyze CI jobs. It consumes existing job analysis file
27
27
28
28
## Prerequisites
29
29
30
-
- Job analysis files must already exist in `/tmp/analyze-ci-claude-workdir/`:
30
+
- Job analysis files must already exist in `${WORKDIR}/`:
31
31
- For releases: `analyze-ci-release-<release>-job-*.txt` (produced by `/analyze-ci-for-release`)
32
32
- For PRs: `analyze-ci-prs-job-*-pr<number>-*.txt` (produced by `/analyze-ci-for-pull-requests`)
33
33
- Each job file must contain a `--- STRUCTURED SUMMARY ---` block (see below)
@@ -54,28 +54,35 @@ FINISHED: <job finish date in YYYY-MM-DD format>
54
54
55
55
If a job file lacks this block, it is skipped with a warning.
- Set `SOURCE_TYPE=pr`, `SOURCE_LABEL="PR #<number>"`
75
82
76
83
**c) Rebase PR shorthand** (e.g., `rebase-release-4.22`):
77
84
- Extract the release version from the shorthand (e.g., `4.22`)
78
-
- Glob for all PR job files: `/tmp/analyze-ci-claude-workdir/analyze-ci-prs-job-*.txt`
85
+
- Glob for all PR job files: `${WORKDIR}/analyze-ci-prs-job-*.txt`
79
86
- Read each file's STRUCTURED SUMMARY and find files where JOB_NAME contains the release version (e.g., `release-4.22` or `main`) OR where the JOB_URL contains the release branch
80
87
- Alternatively, check the PR summary file (`analyze-ci-prs-summary.*.txt`) to find the PR number for the given rebase release
81
88
- Set `SOURCE_TYPE=pr`, `SOURCE_LABEL="rebase PR for <release> (PR #<number>)"`
@@ -152,24 +159,26 @@ If a job file lacks this block, it is skipped with a warning.
152
159
153
160
For each bug candidate, run ALL of the following searches. Each search is MANDATORY — do not skip any.
154
161
155
-
**Search A — Keyword search**:
162
+
**Search A — Keyword search (multiple focused queries)**:
156
163
1. Extract 2-4 distinctive keywords from the error signature (avoid generic words like "error", "failed", "test")
157
-
2. Run:
164
+
2. Run**2-3 separate searches in parallel**, each using 1-2 distinctive keywords. Do NOT put all keywords into a single `text ~` query — Jira requires all terms to match, so queries with 3+ keywords are fragile and miss issues that use slightly different wording. Instead, pick the most distinctive terms (tool names, hyphenated identifiers, error codes) and search for them independently.
158
165
```python
159
-
mcp__jira__jira_search(
160
-
jql='((project = OCPBUGS AND component = MicroShift) OR project = USHIFT) AND text ~ "<keywords>" AND status not in (Closed, Verified) ORDER BY created DESC',
161
-
limit=5
162
-
)
166
+
# Example for error signature: "TLS Scanner image pull failure (ErrImagePull registry.ci.openshift.org/ocp/4.22:tls-scanner-tool on arm64)"
167
+
# Search A1: most distinctive identifier
168
+
mcp__jira__jira_search(jql='... AND issuetype = Bug AND text ~ "tls-scanner" ...', limit=5)
169
+
# Search A2: different distinctive term
170
+
mcp__jira__jira_search(jql='... AND issuetype = Bug AND text ~ "tls-scanner-tool" ...', limit=5)
163
171
```
172
+
3. Merge and deduplicate results from all A-series queries before proceeding
164
173
165
174
**Search B — Test case ID search (MANDATORY when IDs are present)**:
166
175
Extract ALL numeric IDs from the error signature that could be test case references (typically 4-6 digit numbers like `68256`). For EACH numeric ID found, run TWO separate searches:
167
176
```text
168
177
# Search B1: bare number
169
-
jql: ... AND text ~ "68256" AND status not in (Closed, Verified) ...
178
+
jql: ... AND issuetype = Bug AND text ~ "68256" AND status not in (Closed, Verified) ...
170
179
171
180
# Search B2: OCP-prefixed form (OpenShift Polarion convention)
172
-
jql: ... AND text ~ "OCP-68256" AND status not in (Closed, Verified) ...
181
+
jql: ... AND issuetype = Bug AND text ~ "OCP-68256" AND status not in (Closed, Verified) ...
173
182
```
174
183
**Why both forms are required**: Jira's text indexer treats `OCP-68256` as a single token, so `text ~ "68256"` will NOT match issues containing `OCP-68256`, and vice versa. Skipping either form WILL cause missed duplicates.
175
184
@@ -181,7 +190,7 @@ jql: ... AND text ~ "OCP-68256" AND status not in (Closed, Verified) ...
181
190
After completing searches A and B, run an additional keyword search against closed/verified issues to detect potential regressions:
182
191
```python
183
192
mcp__jira__jira_search(
184
-
jql='((project = OCPBUGS AND component = MicroShift) OR project = USHIFT) AND text ~ "<keywords>" AND status in (Closed, Verified) ORDER BY updated DESC',
193
+
jql='((project = OCPBUGS AND component = MicroShift) OR project = USHIFT) AND issuetype = Bug AND text ~ "<keywords>" AND status in (Closed, Verified) ORDER BY updated DESC',
185
194
limit=5
186
195
)
187
196
```
@@ -381,7 +390,7 @@ For each candidate where user chose "reopen":
381
390
### Step 8: Generate Results Report
382
391
383
392
**Actions**:
384
-
1. Save report to `/tmp/analyze-ci-claude-workdir/analyze-ci-create-bugs-<source>.<timestamp>.txt`
393
+
1. Save report to `${WORKDIR}/analyze-ci-create-bugs-<source>.<timestamp>.txt`
Where `${TEST_NAME}` is the test name directory (e.g., `e2e-aws-tests`, `e2e-aws-ovn-ocp-conformance-serial`). Use `find ${TMP}/artifacts -name 'sosreport-*.tar.xz'` to locate it.
**Verification**: After all agents complete, verify that per-job files exist:
119
126
```bash
120
-
ls /tmp/analyze-ci-claude-workdir/analyze-ci-prs-job-*.txt
127
+
ls ${WORKDIR}/analyze-ci-prs-job-*.txt
121
128
```
122
129
If any files are missing, note the gap in the summary report but do NOT re-run the analysis.
123
130
@@ -127,7 +134,7 @@ If any files are missing, note the gap in the summary report but do NOT re-run t
127
134
128
135
**Actions**:
129
136
1. Collect results from all parallel job analyses
130
-
- Read each per-job file from `/tmp/analyze-ci-claude-workdir`
137
+
- Read each per-job file from `${WORKDIR}`
131
138
- Extract the `--- STRUCTURED SUMMARY ---` block from each file for pattern detection (including the `FINISHED` field for job date tracking)
132
139
- Extract key findings from each analysis
133
140
@@ -145,7 +152,7 @@ If any files are missing, note the gap in the summary report but do NOT re-run t
145
152
**Actions**:
146
153
1. Aggregate all job analysis results from parallel execution
147
154
2. Identify common patterns and group by PR and failure type
148
-
3. Generate summary report and save to `/tmp/analyze-ci-claude-workdir/analyze-ci-prs-summary.<timestamp>.txt`
155
+
3. Generate summary report and save to `${WORKDIR}/analyze-ci-prs-summary.<timestamp>.txt`
149
156
4. Display the summary to the user
150
157
151
158
**Important**: Each failed job MUST include the finish date in `[YYYY-MM-DD]` format (from the per-job `FINISHED` field) after the job name. This ensures the HTML report generator can extract dates without reading per-job files.
2. Launch all releases **in parallel** as separate agents — do NOT wait for one to finish before starting the next
42
-
3. After each agent completes, note the summary report file path it produced (typically `/tmp/analyze-ci-claude-workdir/analyze-ci-release-<version>-summary.*.txt`)
50
+
3. After each agent completes, note the summary report file path it produced (typically `${WORKDIR}/analyze-ci-release-<version>-summary.*.txt`)
43
51
4. Wait until all the parallel agents are complete
44
52
5. Track which releases succeeded and which failed
2. This agent can be launched in parallel with the release agents in Step 2
59
-
3. After the agent completes, note the summary report file path (typically `/tmp/analyze-ci-claude-workdir/analyze-ci-prs-summary.*.txt`)
67
+
3. After the agent completes, note the summary report file path (typically `${WORKDIR}/analyze-ci-prs-summary.*.txt`)
60
68
4. If no rebase PRs are found, note "No open rebase PRs" for the report
61
69
62
70
**Progress Reporting**:
@@ -93,7 +101,7 @@ Summary:
93
101
Pull Requests:
94
102
2 rebase PRs with 5 total failed jobs
95
103
96
-
HTML report generated: /tmp/analyze-ci-claude-workdir/microshift-ci-release-manager-20260315-143022.html
104
+
HTML report generated: ${WORKDIR}/microshift-ci-release-manager-20260315-143022.html
97
105
```
98
106
99
107
## Examples
@@ -136,7 +144,7 @@ HTML report generated: /tmp/analyze-ci-claude-workdir/microshift-ci-release-mana
136
144
- All agents (releases + PR analysis) are launched in parallel for maximum efficiency
137
145
- HTML generation is delegated to `analyze-ci-generate-html-report` running as a separate agent — it only reads summary files (not per-job files), keeping context usage minimal
138
146
- The HTML report is self-contained (no external CSS/JS dependencies)
139
-
- All intermediate files from `analyze-ci-for-release` and `analyze-ci-for-pull-requests` remain available in `/tmp/analyze-ci-claude-workdir`
147
+
- All intermediate files from `analyze-ci-for-release` and `analyze-ci-for-pull-requests` remain available in `${WORKDIR}`
140
148
- The HTML file can be opened in any browser for convenient examination
141
149
- If a release analysis fails, it is noted in the report but does not block other releases
142
150
- If no rebase PRs are open, the Pull Requests tab shows "No open rebase pull requests found"
0 commit comments