Post critical errors from cherry_pick.py

This commit is contained in:
Mikhail f. Shiryaev 2024-11-11 15:58:38 +01:00
parent bcab2d51aa
commit 0bdf4402fe
No known key found for this signature in database
GPG Key ID: 4B02ED204C7D93F4

View File

@ -34,8 +34,9 @@ from typing import List, Optional
import __main__
from ci_buddy import CIBuddy
from ci_config import Labels
from env_helper import TEMP_PATH
from env_helper import IS_CI, TEMP_PATH
from get_robot_token import get_best_robot_token
from git_helper import GIT_PREFIX, git_runner, is_shallow
from github_helper import GitHub, PullRequest, PullRequests, Repository
@ -653,6 +654,14 @@ def main():
bp.process_backports()
if bp.error is not None:
logging.error("Finished successfully, but errors occurred!")
if IS_CI:
ci_buddy = CIBuddy()
ci_buddy.post_job_error(
f"The cherry-pick finished with errors: {bp.error}",
with_instance_info=True,
with_wf_link=True,
critical=True,
)
raise bp.error