Merge pull request #62410 from ClickHouse/ci_disable_finish_check_for_mq

CI: disable finish check for mq
This commit is contained in:
Max K 2024-04-09 10:33:59 +00:00 committed by GitHub
commit d5eec609cb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 20 additions and 10 deletions

View File

@ -157,7 +157,7 @@ jobs:
################################# Stage Final #################################
#
FinishCheck:
if: ${{ !failure() && !cancelled() }}
if: ${{ !failure() && !cancelled() && github.event_name != 'merge_group' }}
needs: [Tests_1, Tests_2]
runs-on: [self-hosted, style-checker]
steps:

View File

@ -148,6 +148,11 @@ def set_status_comment(commit: Commit, pr_info: PRInfo) -> None:
"""It adds or updates the comment status to all Pull Requests but for release
one, so the method does nothing for simple pushes and pull requests with
`release`/`release-lts` labels"""
if pr_info.is_merge_queue():
# skip report creation for the MQ
return
# to reduce number of parameters, the Github is constructed on the fly
gh = Github()
gh.__requester = commit._requester # type:ignore #pylint:disable=protected-access
@ -441,7 +446,9 @@ def update_mergeable_check(commit: Commit, pr_info: PRInfo, check_name: str) ->
or pr_info.release_pr
or pr_info.number == 0
)
if not_run:
# FIXME: For now, always set mergeable check in the Merge Queue. It's required to pass MQ
if not_run and not pr_info.is_merge_queue():
# Let's avoid unnecessary work
return

View File

@ -201,14 +201,17 @@ def main():
ci_report_url = create_ci_report(pr_info, [])
print("::notice ::Can run")
post_commit_status(
commit,
PENDING,
ci_report_url,
description,
CI_STATUS_NAME,
pr_info,
)
if not pr_info.is_merge_queue():
# we need clean CI status for MQ to merge (no pending statuses)
post_commit_status(
commit,
PENDING,
ci_report_url,
description,
CI_STATUS_NAME,
pr_info,
)
if __name__ == "__main__":