EnxDev commented on code in PR #42472:
URL: https://github.com/apache/superset/pull/42472#discussion_r3673714355
##########
scripts/change_detector.py:
##########
@@ -88,9 +120,14 @@ def fetch_files_github_api(url: str): # type: ignore
# re-raise once the retry budget is exhausted.
status = getattr(err, "code", None)
is_transient = (
- status is None or status >= 500 or status in
RETRYABLE_STATUS_CODES
+ status is None
+ or status >= 500
+ or status in RETRYABLE_STATUS_CODES
+ or (status == 403 and _is_rate_limited(err)) # type:
ignore[arg-type]
Review Comment:
_is_rate_limited already retries on retry-after being present, which GitHub
sets on standard secondary-rate-limit responses — so those are covered
alongside primary-limit x-ratelimit-remaining: 0. The narrow case it doesn't
retry is a 403 with a positive remaining and no retry-after, which GitHub
doesn't document for throttling; treating all such 403s as transient would also
retry genuine permission errors (the 403 "Resource not accessible by
integration" case this code deliberately fails fast on). Happy to broaden it if
you've hit that response in practice.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]