mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Fix merge issue
This commit is contained in:
parent
a435129dae
commit
b01b91b3ff
@ -14,10 +14,12 @@ from enum import Enum
|
||||
from pathlib import Path
|
||||
from typing import Any, Dict, List, Optional, Sequence, Set, Tuple, Union
|
||||
|
||||
from github import Github
|
||||
|
||||
import docker_images_helper
|
||||
import upload_result_helper
|
||||
from build_check import get_release_or_pr
|
||||
from ci_config import CI_CONFIG, Build, CIStages, Labels, JobNames
|
||||
from ci_config import CI_CONFIG, Build, CIStages, JobNames, Labels
|
||||
from ci_utils import GHActions, is_hex, normalize_string
|
||||
from clickhouse_helper import (
|
||||
CiLogsCredentials,
|
||||
@ -49,7 +51,6 @@ from env_helper import (
|
||||
from get_robot_token import get_best_robot_token
|
||||
from git_helper import GIT_PREFIX, Git
|
||||
from git_helper import Runner as GitRunner
|
||||
from github import Github
|
||||
from pr_info import PRInfo
|
||||
from report import ERROR, SUCCESS, BuildResult, JobReport
|
||||
from s3_helper import S3Helper
|
||||
@ -2115,69 +2116,6 @@ def main() -> int:
|
||||
db="default", table="checks", events=prepared_events
|
||||
)
|
||||
else:
|
||||
<<<<<<< HEAD
|
||||
print("ERROR: Job was killed - generate evidence")
|
||||
job_report.update_duration()
|
||||
ret_code = os.getenv("JOB_EXIT_CODE", "")
|
||||
if ret_code:
|
||||
try:
|
||||
job_report.exit_code = int(ret_code)
|
||||
except ValueError:
|
||||
pass
|
||||
if Utils.is_killed_with_oom():
|
||||
print("WARNING: OOM while job execution")
|
||||
print(subprocess.run("sudo dmesg -T", check=False))
|
||||
error_description = f"Out Of Memory, exit_code {job_report.exit_code}"
|
||||
else:
|
||||
error_description = f"Unknown, exit_code {job_report.exit_code}"
|
||||
CIBuddy().post_job_error(
|
||||
error_description + f" after {int(job_report.duration)}s",
|
||||
job_name=_get_ext_check_name(args.job_name),
|
||||
)
|
||||
if CI.is_test_job(args.job_name):
|
||||
gh = GitHub(get_best_robot_token(), per_page=100)
|
||||
commit = get_commit(gh, pr_info.sha)
|
||||
check_url = ""
|
||||
if job_report.test_results or job_report.additional_files:
|
||||
check_url = upload_result_helper.upload_results(
|
||||
s3,
|
||||
pr_info.number,
|
||||
pr_info.sha,
|
||||
pr_info.head_ref,
|
||||
job_report.test_results,
|
||||
job_report.additional_files,
|
||||
job_report.check_name or _get_ext_check_name(args.job_name),
|
||||
)
|
||||
post_commit_status(
|
||||
commit,
|
||||
ERROR,
|
||||
check_url,
|
||||
"Error: " + error_description,
|
||||
_get_ext_check_name(args.job_name),
|
||||
pr_info,
|
||||
dump_to_file=True,
|
||||
)
|
||||
|
||||
if not job_report.job_skipped:
|
||||
print("push finish record to ci db")
|
||||
prepared_events = prepare_tests_results_for_clickhouse(
|
||||
pr_info,
|
||||
[
|
||||
TestResult(
|
||||
JOB_FINISHED_TEST_NAME,
|
||||
FAIL if error_description else OK,
|
||||
raw_logs=error_description or None,
|
||||
)
|
||||
],
|
||||
SUCCESS if not error_description else ERROR,
|
||||
0.0,
|
||||
JobReport.get_start_time_from_current(),
|
||||
"",
|
||||
_get_ext_check_name(args.job_name),
|
||||
)
|
||||
ClickHouseHelper().insert_events_into(
|
||||
db="default", table="checks", events=prepared_events
|
||||
)
|
||||
# no job report
|
||||
print(f"No job report for {[args.job_name]} - do nothing")
|
||||
### POST action: end
|
||||
|
Loading…
Reference in New Issue
Block a user