Repository navigation
CI: agent skills fixes for the new S3 report prefix scheme - #117287
Conversation
Follow-up for #110081, which changed the S3 report layout so that the result JSON now lives under the normalized workflow name both as a path segment and in the file name: PRs/<pr>/<sha>/<workflow>/result_<workflow>.json REFs/master/<sha>/<workflow>/result_<workflow>.json `check_ci.py` still fetched the old `.../result_pr.json` path, so the download returned an S3 AccessDenied body that failed to parse as JSON. Build the URL from `Utils.normalize_string(<workflow name>)` for both the PR/master report and the sync-PR report. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
|
Workflow [PR], commit [2560613] Summary: ✅ AI ReviewSummaryThis PR updates Findings
Final Verdict
|
Add -f to the report curl in get_ci_praktika_result so a missing or forbidden S3 object fails immediately with a clear error instead of downloading the S3 AccessDenied body and blowing up later in Result.from_file with an opaque JSON parse exception. This mirrors the -f already used by get_sync_pr_result. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
|
Thanks for the review. I checked each point against Why the report layout is segmented now.
Empirical check (live S3):
#117287's own report is flat only because it was built before this branch merged master; reports produced by current master are segmented, which is what these readers now target. The |
| const workflowSegment = normalizeTaskName(workflowName); | ||
| const normalizedTask = normalizeTaskName(taskName); | ||
| return `${baseUrl}/${suffix}/${encodeURIComponent(sha)}/result_${normalizedTask}.json`; | ||
| return `${baseUrl}/${suffix}/${encodeURIComponent(sha)}/${workflowSegment}/result_${normalizedTask}.json`; |
There was a problem hiding this comment.
This hardcodes the post-29c7bd89c89 layout for every HTML or top-level workflow URL, so historical CI links stop working.
Live repro on current HEAD:
node .claude/tools/fetch_ci_report.js "https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=117287&sha=83e3e3d2ae48bb61ba1a1521b85120cbbca52f85&name_0=PR"That now requests .../PRs/117287/83e3e3d2.../pr/result_pr.json and fails with 403, while the legacy flat object .../PRs/117287/83e3e3d2.../result_pr.json still returns 200. This PR's updated docs also say older json.html links are still accepted, and many issue / PR comments already store those URLs. Please keep the new segmented path for current reports, but fall back to the flat top-level report path when the workflow-segmented object is missing.
| # The performance comparison always runs in the "PR" workflow, whose normalized | ||
| # name is "pr" (Utils.normalize_string("PR")). See get_s3_prefix_static in | ||
| # ci/praktika/_environment.py and buildResultPath in ci/praktika/praktika.html. | ||
| pr_json_url = f"{base_url}/PRs/{pr_number}/{sha}/{WORKFLOW_SEGMENT}/result_pr.json" |
There was a problem hiding this comment.
This has the same backward-compatibility regression for historical performance reports. The CLI still accepts json.html URLs, but:
python3 .claude/tools/fetch_perf_report.py "https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=117287&sha=83e3e3d2ae48bb61ba1a1521b85120cbbca52f85&name_0=PR" --summarynow dies on .../PRs/117287/83e3e3d2.../pr/result_pr.json, while the legacy flat .../PRs/117287/83e3e3d2.../result_pr.json still exists. That means older performance-report links in PR and issue history can no longer be analyzed. Please probe the pre-layout flat top-level report path here before assuming the workflow-segmented layout.
|
|
||
| def get_performance_shards(pr_number: int, sha: str) -> list[PerfShard]: | ||
| pr_json_url = f"{REPORTS_BUCKET}/PRs/{pr_number}/{sha}/result_pr.json" | ||
| pr_json_url = f"{REPORTS_BUCKET}/PRs/{pr_number}/{sha}/{PR_WORKFLOW_SEGMENT}/result_pr.json" |
There was a problem hiding this comment.
double_check_perf.py now makes the same one-layout assumption for every historical commit. On current HEAD, even:
python3 .claude/skills/double-check-perf-tests/double_check_perf.py 83e3e3d2ae48bb61ba1a1521b85120cbbca52f85 --pr 117287 --dry-runfails immediately with HTTP 403 for .../PRs/117287/83e3e3d2.../pr/result_pr.json, although the old flat .../PRs/117287/83e3e3d2.../result_pr.json is still there. This skill is meant to reproduce an arbitrary CI-measured commit, so the report lookup needs the same legacy flat-path fallback as the other readers instead of assuming every historical run already has the workflow segment.
Follow-up for #110081, which changed the S3 report layout so the result JSON now lives under the normalized workflow name both as a path segment and in the file name:
PRs/<pr>/<sha>/<workflow>/result_<workflow>.jsonREFs/master/<sha>/<workflow>/result_<workflow>.jsonci/jobs/scripts/check_ci.pystill fetched the old.../result_pr.jsonpath, socurldownloaded an S3AccessDeniedbody that then failed to parse as JSON (Expecting value: line 1 column 1). The URL is now built fromUtils.normalize_string(<workflow name>)for both the PR/master report and the sync-PR report.Also picks up the accompanying
.claude/tooling and skill edits.Related: #110081
Changelog category (leave one):
🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/117287]
Version info
26.9.1.436(included in26.9and later)