diff --git a/scripts/ci/publish_traces.py b/scripts/ci/publish_traces.py index e024c7bba..31e18bcf0 100644 --- a/scripts/ci/publish_traces.py +++ b/scripts/ci/publish_traces.py @@ -8,6 +8,7 @@ import json import os import sys import time +import warnings from urllib.error import HTTPError from urllib.request import Request, urlopen @@ -338,6 +339,15 @@ def publish_traces(traces_dir, run_id, run_number): is_retryable = True error_type = f"HTTP {e.code}" + # Check for rate limit errors (non-fatal - just warn and skip) + if ( + isinstance(e, HTTPError) + and e.code in [403, 429] + and "rate limit exceeded" in getattr(e, "error_body", "").lower() + ): + warnings.warn("GitHub API rate limit exceeded. Skipping trace upload.") + return + if is_retryable and attempt < max_retries - 1: print( f"Attempt {attempt + 1}/{max_retries} failed ({error_type}). Retrying in {retry_delay} seconds..."