Update release script to check more often for actions being completed (every 1m) (#20093)

(`_wait_for_actions`)

Spawning from seeing the release CI being complete but needing to wait
up to 5 minutes longer to continue on.

### Dev notes

Originally the waiting was introduced in
https://github.com/matrix-org/synapse/pull/13483

GitHub rate limit:

> The primary rate limit for unauthenticated requests is 60 requests per
hour.
>
> *-- https://docs.github.com/en/rest/using-the-rest-api/rate-limits-for-the-rest-api?apiVersion=2026-03-10#primary-rate-limit-for-unauthenticated-users*
This commit is contained in:
Eric Eastwood
2026-08-12 11:54:53 -05:00
committed by GitHub
parent 3d402e6865
commit e6cc157cbd
2 changed files with 8 additions and 1 deletions
+7 -1
View File
@@ -600,9 +600,15 @@ def _wait_for_actions(gh_token: str | None) -> None:
headers["authorization"] = f"token {gh_token}"
req = urllib.request.Request(url, headers=headers)
# Initially, wait 10 minutes as we know the CI typically takes 15m+ anyway (no need
# to check over and over when we know it won't be finished yet)
time.sleep(10 * 60)
while True:
time.sleep(5 * 60)
# Then check once every minute. Short enough to not have to wait around too long
# while not spamming the GitHub API and running into the unauthenticated API
# request rate limit (60 requests per hour so 1 request/minute perfectly aligns
# to not run into any problems)
time.sleep(1 * 60)
response = urllib.request.urlopen(req)
resp = json.loads(response.read())