mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
CI: Set error status for job with OOM
This commit is contained in:
parent
90142b73ad
commit
1495ef3218
@ -36,6 +36,7 @@ disable = '''
|
||||
bare-except,
|
||||
no-else-return,
|
||||
global-statement,
|
||||
f-string-without-interpolation,
|
||||
'''
|
||||
|
||||
[tool.pylint.SIMILARITIES]
|
||||
|
@ -1125,6 +1125,7 @@ def main() -> int:
|
||||
|
||||
### POST action: start
|
||||
elif args.post:
|
||||
has_oom_error = False
|
||||
if Shell.check(
|
||||
"sudo dmesg -T | grep -q -e 'Out of memory: Killed process' -e 'oom_reaper: reaped process' -e 'oom-kill:constraint=CONSTRAINT_NONE'"
|
||||
):
|
||||
@ -1132,6 +1133,7 @@ def main() -> int:
|
||||
CIBuddy(dry_run=not pr_info.is_release).post_error(
|
||||
"Out Of Memory", job_name=_get_ext_check_name(args.job_name)
|
||||
)
|
||||
has_oom_error = True
|
||||
|
||||
job_report = JobReport.load() if JobReport.exist() else None
|
||||
if job_report:
|
||||
@ -1234,6 +1236,23 @@ def main() -> int:
|
||||
indata["build"],
|
||||
ch_helper,
|
||||
)
|
||||
else:
|
||||
if CI.is_test_job(args.job_name):
|
||||
if has_oom_error:
|
||||
description = "ERROR: Out Of Memory"
|
||||
else:
|
||||
description = "ERROR: Unknown job status"
|
||||
gh = GitHub(get_best_robot_token(), per_page=100)
|
||||
commit = get_commit(gh, pr_info.sha)
|
||||
post_commit_status(
|
||||
commit,
|
||||
ERROR,
|
||||
"",
|
||||
description,
|
||||
job_report.check_name or _get_ext_check_name(args.job_name),
|
||||
pr_info,
|
||||
dump_to_file=True,
|
||||
)
|
||||
else:
|
||||
# no job report
|
||||
print(f"No job report for {[args.job_name]} - do nothing")
|
||||
|
Loading…
Reference in New Issue
Block a user