Fix race condition in /tag-and-rerun-ci command (#16142)
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
import time
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
from github import Auth, Github
|
from github import Auth, Github
|
||||||
@@ -301,6 +302,12 @@ def main():
|
|||||||
tagged = handle_tag_run_ci(
|
tagged = handle_tag_run_ci(
|
||||||
repo, pr, comment, user_perms, react_on_success=False
|
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(
|
rerun = handle_rerun_failed_ci(
|
||||||
repo, pr, comment, user_perms, react_on_success=False
|
repo, pr, comment, user_perms, react_on_success=False
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user