Fix race condition in /tag-and-rerun-ci command (#16142)

This commit is contained in:
Alison Shao
2025-12-30 15:55:49 +08:00
committed by GitHub
parent 6a3e709253
commit 8c5d91b884
+7
View File
@@ -1,6 +1,7 @@
import json
import os
import sys
import time
import requests
from github import Auth, Github
@@ -301,6 +302,12 @@ def main():
tagged = handle_tag_run_ci(
repo, pr, comment, user_perms, react_on_success=False
)
# Wait for the label to propagate before triggering rerun
if tagged:
print("Waiting 5 seconds for label to propagate...")
time.sleep(5)
rerun = handle_rerun_failed_ci(
repo, pr, comment, user_perms, react_on_success=False
)