Skip to content

Commit 730c825

Browse files
typeidclaude
andcommitted
docs: add check-docs job to CI docs and ci-troubleshoot agent
Add the check-docs Prettier formatting job to the CI README jobs table and update the ci-troubleshoot agent with the new job in all relevant sections (job type table, validation tests, key files, job history URLs, and common failure patterns). Also fix Prettier formatting in ci-troubleshoot.md. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent e342200 commit 730c825

File tree

2 files changed

+51
-42
lines changed

2 files changed

+51
-42
lines changed

.claude/agents/ci-troubleshoot.md

Lines changed: 50 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ If no known issue matches, proceed with the full investigation flow.
3131
If the user has not provided a Prow job URL, ask them for one.
3232

3333
Valid URL formats:
34+
3435
- `https://prow.ci.openshift.org/view/gs/test-platform-results/pr-logs/pull/openshift-online_rosa-regional-platform/<PR#>/<job-name>/<run-id>`
3536
- `https://prow.ci.openshift.org/view/gs/test-platform-results/logs/<job-name>/<run-id>`
3637

@@ -40,14 +41,15 @@ If the user only says "the nightly failed" or similar, use the job history URLs
4041

4142
Parse the Prow URL to identify the job type:
4243

43-
| URL contains | Job Type | Has provision/teardown? | Source branch |
44-
|---|---|---|---|
45-
| `on-demand-e2e` | Ephemeral E2E (PR) | Yes | PR branch |
46-
| `nightly-ephemeral` | Ephemeral E2E (nightly) | Yes | `main` |
47-
| `nightly-integration` | Integration E2E | No | `main` |
48-
| `terraform-validate` | Validation | No | PR branch |
49-
| `helm-lint` | Validation | No | PR branch |
50-
| `check-rendered-files` | Validation | No | PR branch |
44+
| URL contains | Job Type | Has provision/teardown? | Source branch |
45+
| ---------------------- | ----------------------- | ----------------------- | ------------- |
46+
| `on-demand-e2e` | Ephemeral E2E (PR) | Yes | PR branch |
47+
| `nightly-ephemeral` | Ephemeral E2E (nightly) | Yes | `main` |
48+
| `nightly-integration` | Integration E2E | No | `main` |
49+
| `terraform-validate` | Validation | No | PR branch |
50+
| `helm-lint` | Validation | No | PR branch |
51+
| `check-rendered-files` | Validation | No | PR branch |
52+
| `check-docs` | Validation | No | PR branch |
5153

5254
## Step 3: Convert Prow URL to Artifact URLs
5355

@@ -56,6 +58,7 @@ Replace `https://prow.ci.openshift.org/view/gs/` with `https://gcsweb-ci.apps.ci
5658
The `<short-job-name>` is the last segment of the job name (e.g., `on-demand-e2e`, `nightly-ephemeral`).
5759

5860
**Example:**
61+
5962
- Prow: `https://prow.ci.openshift.org/view/gs/test-platform-results/pr-logs/pull/openshift-online_rosa-regional-platform/191/pull-ci-openshift-online-rosa-regional-platform-main-on-demand-e2e/123456`
6063
- Artifacts: `https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/test-platform-results/pr-logs/pull/openshift-online_rosa-regional-platform/191/pull-ci-openshift-online-rosa-regional-platform-main-on-demand-e2e/123456/artifacts/on-demand-e2e/`
6164

@@ -118,29 +121,30 @@ These jobs have three steps: `provision-ephemeral`, `e2e-tests`, `teardown-ephem
118121

119122
Single `e2e-tests` step — fetch and analyze `<artifacts-url>/e2e-tests/build-log.txt`.
120123

121-
### Validation Tests (terraform-validate, helm-lint, check-rendered-files)
124+
### Validation Tests (terraform-validate, helm-lint, check-rendered-files, check-docs)
122125

123126
Single step matching job name — fetch `<artifacts-url>/<job-name>/build-log.txt`.
124127

125128
## Step 6: Cross-Reference with Source Code
126129

127130
Use `git show <commit>:<path>` (or Read for nightly/main) to understand the failing code. Key CI files:
128131

129-
| File | Purpose |
130-
|---|---|
131-
| `ci/pre-merge.py` | Orchestrates ephemeral provision and teardown |
132-
| `ci/e2e-tests.sh` | Runs the e2e test suite |
133-
| `ci/e2e-platform-api-test.sh` | Platform API specific e2e tests |
134-
| `ci/nightly.sh` | Entry point for nightly jobs |
135-
| `ci/ephemerallib/ephemeral.py` | Ephemeral environment lifecycle |
136-
| `ci/ephemerallib/pipeline.py` | Pipeline provisioner management |
137-
| `ci/ephemerallib/codebuild_logs.py` | CodeBuild log collection |
138-
| `ci/ephemerallib/aws.py` | AWS utility functions |
139-
| `ci/ephemerallib/git.py` | Git operations for CI branches |
140-
| `terraform/modules/` | Terraform modules (for provision failures) |
141-
| `argocd/` | ArgoCD configs (for deployment/sync failures) |
142-
| `scripts/buildspec/` | CodeBuild buildspec scripts |
143-
| `scripts/pipeline-common/` | Shared pipeline helper scripts |
132+
| File | Purpose |
133+
| ----------------------------------- | --------------------------------------------- |
134+
| `ci/check-docs.sh` | Checks markdown formatting with Prettier |
135+
| `ci/pre-merge.py` | Orchestrates ephemeral provision and teardown |
136+
| `ci/e2e-tests.sh` | Runs the e2e test suite |
137+
| `ci/e2e-platform-api-test.sh` | Platform API specific e2e tests |
138+
| `ci/nightly.sh` | Entry point for nightly jobs |
139+
| `ci/ephemerallib/ephemeral.py` | Ephemeral environment lifecycle |
140+
| `ci/ephemerallib/pipeline.py` | Pipeline provisioner management |
141+
| `ci/ephemerallib/codebuild_logs.py` | CodeBuild log collection |
142+
| `ci/ephemerallib/aws.py` | AWS utility functions |
143+
| `ci/ephemerallib/git.py` | Git operations for CI branches |
144+
| `terraform/modules/` | Terraform modules (for provision failures) |
145+
| `argocd/` | ArgoCD configs (for deployment/sync failures) |
146+
| `scripts/buildspec/` | CodeBuild buildspec scripts |
147+
| `scripts/pipeline-common/` | Shared pipeline helper scripts |
144148

145149
## Step 7: Provide Diagnosis
146150

@@ -156,6 +160,7 @@ Present findings in this format:
156160
<Clear explanation with relevant log excerpts>
157161

158162
**Files Involved:**
163+
159164
- `<file path>` — <role in the failure>
160165

161166
**Recommended Fix:**
@@ -166,14 +171,15 @@ Present findings in this format:
166171

167172
## Reference: Job History URLs
168173

169-
| Job | History URL |
170-
|---|---|
171-
| `terraform-validate` | `https://prow.ci.openshift.org/job-history/gs/test-platform-results/pr-logs/directory/pull-ci-openshift-online-rosa-regional-platform-main-terraform-validate` |
172-
| `helm-lint` | `https://prow.ci.openshift.org/job-history/gs/test-platform-results/pr-logs/directory/pull-ci-openshift-online-rosa-regional-platform-main-helm-lint` |
174+
| Job | History URL |
175+
| ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
176+
| `check-docs` | `https://prow.ci.openshift.org/job-history/gs/test-platform-results/pr-logs/directory/pull-ci-openshift-online-rosa-regional-platform-main-check-docs` |
177+
| `terraform-validate` | `https://prow.ci.openshift.org/job-history/gs/test-platform-results/pr-logs/directory/pull-ci-openshift-online-rosa-regional-platform-main-terraform-validate` |
178+
| `helm-lint` | `https://prow.ci.openshift.org/job-history/gs/test-platform-results/pr-logs/directory/pull-ci-openshift-online-rosa-regional-platform-main-helm-lint` |
173179
| `check-rendered-files` | `https://prow.ci.openshift.org/job-history/gs/test-platform-results/pr-logs/directory/pull-ci-openshift-online-rosa-regional-platform-main-check-rendered-files` |
174-
| `on-demand-e2e` | `https://prow.ci.openshift.org/job-history/gs/test-platform-results/pr-logs/directory/pull-ci-openshift-online-rosa-regional-platform-main-on-demand-e2e` |
175-
| `nightly-ephemeral` | `https://prow.ci.openshift.org/job-history/gs/test-platform-results/logs/periodic-ci-openshift-online-rosa-regional-platform-main-nightly-ephemeral` |
176-
| `nightly-integration` | `https://prow.ci.openshift.org/job-history/gs/test-platform-results/logs/periodic-ci-openshift-online-rosa-regional-platform-main-nightly-integration` |
180+
| `on-demand-e2e` | `https://prow.ci.openshift.org/job-history/gs/test-platform-results/pr-logs/directory/pull-ci-openshift-online-rosa-regional-platform-main-on-demand-e2e` |
181+
| `nightly-ephemeral` | `https://prow.ci.openshift.org/job-history/gs/test-platform-results/logs/periodic-ci-openshift-online-rosa-regional-platform-main-nightly-ephemeral` |
182+
| `nightly-integration` | `https://prow.ci.openshift.org/job-history/gs/test-platform-results/logs/periodic-ci-openshift-online-rosa-regional-platform-main-nightly-integration` |
177183

178184
## Step 8: Feedback and Learning
179185

@@ -203,6 +209,7 @@ If the pattern already exists but this instance adds new information (e.g., a ne
203209
### On thumbs down (incorrect diagnosis):
204210

205211
Ask the user what was wrong. Use their feedback to:
212+
206213
1. Correct your diagnosis
207214
2. If the user provides the actual root cause, offer to save that as a known issue instead
208215
3. If a known issue entry led to the wrong diagnosis, offer to update or remove it
@@ -215,14 +222,15 @@ Ask the user what was wrong. Use their feedback to:
215222

216223
## Common Failure Patterns
217224

218-
| Pattern | Likely Cause | Where to Look |
219-
|---|---|---|
220-
| `unbound variable` | Missing config field or export | `.FAILED.log`, check `load-deploy-config.sh` and config JSONs |
221-
| `terraform destroy` timeout | Resources stuck deleting | teardown `.FAILED.log`, dependency errors |
222-
| `No such file or directory` | Missing rendered files or config | `ci/pre-merge.py`, `argocd/rendered/` |
223-
| `CodeBuild build failed` | Terraform apply error | `.FAILED.log` in `codebuild-logs/` |
224-
| API Gateway 403/401 | IAM or API key issue | `e2e-tests` build log |
225-
| `connection refused` / timeout | Infrastructure not ready | `e2e-tests` build log, provision logs |
226-
| `helm template` error | Invalid Helm values | `helm-lint` build log, `argocd/config/` |
227-
| `rendered files are out of date` | Need to re-run render scripts | `check-rendered-files` build log |
228-
| Python traceback in `pre-merge.py` | Bug in CI orchestration | `provision-ephemeral` build log, `ci/ephemerallib/` |
225+
| Pattern | Likely Cause | Where to Look |
226+
| ---------------------------------- | -------------------------------- | ------------------------------------------------------------- |
227+
| `unbound variable` | Missing config field or export | `.FAILED.log`, check `load-deploy-config.sh` and config JSONs |
228+
| `terraform destroy` timeout | Resources stuck deleting | teardown `.FAILED.log`, dependency errors |
229+
| `No such file or directory` | Missing rendered files or config | `ci/pre-merge.py`, `argocd/rendered/` |
230+
| `CodeBuild build failed` | Terraform apply error | `.FAILED.log` in `codebuild-logs/` |
231+
| API Gateway 403/401 | IAM or API key issue | `e2e-tests` build log |
232+
| `connection refused` / timeout | Infrastructure not ready | `e2e-tests` build log, provision logs |
233+
| `helm template` error | Invalid Helm values | `helm-lint` build log, `argocd/config/` |
234+
| `rendered files are out of date` | Need to re-run render scripts | `check-rendered-files` build log |
235+
| `Code style issues found` | Markdown not formatted | `check-docs` build log, run `npx prettier --write '**/*.md'` |
236+
| Python traceback in `pre-merge.py` | Bug in CI orchestration | `provision-ephemeral` build log, `ci/ephemerallib/` |

ci/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ CI is managed through the [OpenShift CI](https://docs.ci.openshift.org/) system
66

77
| Job | Schedule | Description |
88
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
9+
| [`check-docs`](https://prow.ci.openshift.org/job-history/gs/test-platform-results/pr-logs/directory/pull-ci-openshift-online-rosa-regional-platform-main-check-docs) | Pre-submit | Checks markdown formatting with [Prettier](https://prettier.io/) |
910
| [`terraform-validate`](https://prow.ci.openshift.org/job-history/gs/test-platform-results/pr-logs/directory/pull-ci-openshift-online-rosa-regional-platform-main-terraform-validate) | Pre-submit | Runs `terraform validate` on all root modules |
1011
| [`helm-lint`](https://prow.ci.openshift.org/job-history/gs/test-platform-results/pr-logs/directory/pull-ci-openshift-online-rosa-regional-platform-main-helm-lint) | Pre-submit | Lints Helm charts |
1112
| [`check-rendered-files`](https://prow.ci.openshift.org/job-history/gs/test-platform-results/pr-logs/directory/pull-ci-openshift-online-rosa-regional-platform-main-check-rendered-files) | Pre-submit | Verifies rendered deploy files are up to date |

0 commit comments

Comments
 (0)