mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +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:
|
||||
@ -1235,8 +1237,25 @@ def main() -> int:
|
||||
ch_helper,
|
||||
)
|
||||
else:
|
||||
# no job report
|
||||
print(f"No job report for {[args.job_name]} - do nothing")
|
||||
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")
|
||||
### POST action: end
|
||||
|
||||
### MARK SUCCESS action: start
|
||||
|
Loading…
Reference in New Issue
Block a user