fetch_perf_report: report skipped shards instead of failing to download

The amd perf comparison only runs on 'pr-performance' PRs, so on a normal
PR those shards are SKIPPED and produce no artifacts. The tool tried to
download them anyway and printed six "Failed to download" warnings.

Detect shards whose result status is SKIPPED, print a single clean
"Skipped (<reason>)" line each, and exclude them from the download set.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
This commit is contained in:
Raúl Marín
2026-07-10 16:10:11 +02:00
co-authored by Claude Opus 4.8
parent 11c4f4b44a
commit fa71e76e5b
+11
View File
@@ -735,6 +735,17 @@ def main():
print("No matching shards found", file=sys.stderr)
sys.exit(1)
# Jobs that didn't run (e.g. the amd perf comparison only runs on 'pr-performance' PRs) have no
# artifacts, so report them cleanly instead of attempting a download that 403s.
skipped = [s for s in shards if str(s.get("status", "")).upper() == "SKIPPED"]
for s in skipped:
print(f" Skipped: {s['name']} ({s.get('info') or 'not run'})", file=sys.stderr)
shards = [s for s in shards if str(s.get("status", "")).upper() != "SKIPPED"]
if not shards:
print("No shards to fetch (all matching jobs were skipped)", file=sys.stderr)
sys.exit(1)
print(f"Fetching {len(shards)} performance shard(s)...\n", file=sys.stderr)
# Download TSV data in parallel