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
Always extract `<PIPELINE>` (e.g. `premerge`, `postmerge`) and `<BUILD_NUM>` from the URL the user provides. **Do not hardcode `premerge`** — the same skill is used for all pipelines. If a `#<JOB_ID>` fragment is present, it identifies a specific real job (not a group/wait job) and can be queried directly.
11
21
12
22
## Steps
23
+
13
24
1. Verify token: `echo $BUILDKITE_API_TOKEN | head -c4`
14
25
2. If token missing, stop and show setup instructions from the dev docs
| python3 -c "import sys,json; jobs=json.load(sys.stdin)['jobs']; [print(f\"{j['id']} {j.get('name')} -> {j.get('state')}\") for j in jobs if j['id']=='<JOB_ID>']"
| python3 -c "import sys,json; jobs=json.load(sys.stdin)['jobs']; [print(f\"{j['id']} {j['name']} -> {j['state']}\") for j in jobs if j.get('state') in ('failed','broken')]"
25
42
```
26
-
5. Fetch individual job logs and analyze root causes
Logs come back as JSON with a `content` field containing ANSI escape codes — strip them with `re.sub(r'\x1b\[[0-9;]*m', '', content)` before grepping.
50
+
7. Summarize failures and suggest fixes.
51
+
52
+
## Authentication note
53
+
54
+
If `curl` returns `{"message":"No organization found"}`, the configured token does not have access to `ray-project`. The user may have a separate org-scoped token — ask them which env var to source.
0 commit comments