mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Merge pull request #66488 from ClickHouse/ci_gh_retry
CI: Add retry for GH set_status_comment call
This commit is contained in:
commit
cff67cc0ee
@ -6,6 +6,7 @@ import os
|
||||
import re
|
||||
import subprocess
|
||||
import sys
|
||||
import time
|
||||
from dataclasses import dataclass
|
||||
from pathlib import Path
|
||||
from typing import Any, Dict, List, Optional
|
||||
@ -550,7 +551,17 @@ def _update_gh_statuses_action(indata: Dict, s3: S3Helper) -> None:
|
||||
except Exception as e:
|
||||
raise e
|
||||
print("Going to update overall CI report")
|
||||
set_status_comment(commit, pr_info)
|
||||
for retry in range(2):
|
||||
try:
|
||||
set_status_comment(commit, pr_info)
|
||||
break
|
||||
except Exception as e:
|
||||
print(
|
||||
f"WARNING: Failed to update CI Running status, attempt [{retry + 1}], exception [{e}]"
|
||||
)
|
||||
time.sleep(1)
|
||||
else:
|
||||
print("ERROR: All retry attempts failed.")
|
||||
print("... CI report update - done")
|
||||
|
||||
|
||||
@ -996,10 +1007,10 @@ def main() -> int:
|
||||
args.skip_jobs,
|
||||
)
|
||||
|
||||
ci_cache.print_status()
|
||||
if IS_CI and pr_info.is_pr and not ci_settings.no_ci_cache:
|
||||
ci_cache.filter_out_not_affected_jobs()
|
||||
|
||||
ci_cache.print_status()
|
||||
ci_cache.print_status()
|
||||
|
||||
if IS_CI and not pr_info.is_merge_queue:
|
||||
# wait for pending jobs to be finished, await_jobs is a long blocking call
|
||||
|
@ -714,7 +714,7 @@ class CiCache:
|
||||
if CI.is_test_job(job_name) and job_name != CI.JobNames.BUILD_CHECK:
|
||||
if job_config.reference_job_name:
|
||||
reference_name = job_config.reference_job_name
|
||||
reference_config = self.jobs_to_do[reference_name]
|
||||
reference_config = CI.JOB_CONFIGS[reference_name]
|
||||
else:
|
||||
reference_name = job_name
|
||||
reference_config = job_config
|
||||
@ -745,7 +745,8 @@ class CiCache:
|
||||
del self.jobs_to_do[job]
|
||||
if job in self.jobs_to_wait:
|
||||
del self.jobs_to_wait[job]
|
||||
self.jobs_to_skip.append(job)
|
||||
if job in self.jobs_to_skip:
|
||||
self.jobs_to_skip.remove(job)
|
||||
|
||||
def await_pending_jobs(self, is_release: bool, dry_run: bool = False) -> None:
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user