Skip to content

Commit 48a4c40

Browse files
authored
Merge pull request ClickHouse#62786 from ClickHouse/tiny-ci-improvements
Tiny CI improvements
2 parents 3f52f6e + c9e4125 commit 48a4c40

15 files changed

+19
-48
lines changed

pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ max-branches=50
77
max-nested-blocks=10
88
max-statements=200
99

10+
[tool.isort]
11+
profile = "black"
12+
src_paths = ["src", "tests/ci", "tests/sqllogic"]
13+
1014
[tool.pylint.FORMAT]
1115
#ignore-long-lines = (# )?<?https?://\S+>?$
1216

tests/ci/artifacts_helper.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,8 @@
1010
from shutil import copy2
1111
from typing import List, Optional, Union
1212

13-
# isort: off
1413
from github.Commit import Commit
1514

16-
# isort: on
17-
1815
from build_download_helper import download_build_with_progress
1916
from commit_status_helper import post_commit_status
2017
from compress_files import SUFFIX, compress_fast, decompress_fast

tests/ci/build_download_helper.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,8 @@
88
from pathlib import Path
99
from typing import Any, Callable, List, Optional, Union
1010

11-
# isort: off
1211
import requests
1312

14-
# isort: on
15-
1613
import get_robot_token as grt # we need an updated ROBOT_TOKEN
1714
from ci_config import CI_CONFIG
1815

tests/ci/build_report_check.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,8 @@ def main():
139139
additional_files=[report_path],
140140
).dump()
141141

142-
if summary_status == ERROR:
142+
# We should fail the report job to rerun it in the following attempts
143+
if summary_status != SUCCESS:
143144
sys.exit(1)
144145

145146

tests/ci/commit_status_helper.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
from pathlib import Path
1010
from typing import Dict, List, Optional, Union
1111

12-
# isort: off
1312
from github import Github
1413
from github.Commit import Commit
1514
from github.CommitStatus import CommitStatus
@@ -18,8 +17,6 @@
1817
from github.IssueComment import IssueComment
1918
from github.Repository import Repository
2019

21-
# isort: on
22-
2320
from ci_config import CHECK_DESCRIPTIONS, REQUIRED_CHECKS, CheckDescription
2421
from env_helper import GITHUB_REPOSITORY, GITHUB_RUN_URL, TEMP_PATH
2522
from pr_info import SKIP_MERGEABLE_CHECK_LABEL, PRInfo

tests/ci/compatibility_check.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,8 @@
88
from pathlib import Path
99
from typing import List, Tuple
1010

11-
# isort: off
1211
from pip._vendor.packaging.version import Version
1312

14-
# isort: on
15-
1613
from build_download_helper import download_builds_filter
1714
from docker_images_helper import DockerImage, get_docker_image, pull_image
1815
from env_helper import REPORT_PATH, TEMP_PATH

tests/ci/docker_images_check.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,8 @@
88
from pathlib import Path
99
from typing import List, Optional, Tuple
1010

11-
# isort: off
1211
from github import Github
1312

14-
# isort: on
15-
1613
from clickhouse_helper import ClickHouseHelper, prepare_tests_results_for_clickhouse
1714
from commit_status_helper import format_description, get_commit, post_commit_status
1815
from docker_images_helper import DockerImageData, docker_login, get_images_oredered_list
@@ -225,9 +222,11 @@ def main():
225222
parent_version = (
226223
None
227224
if not image.parent
228-
else image_tags[image.parent]
229-
if not args.suffix
230-
else f"{image_tags[image.parent]}-{args.suffix}"
225+
else (
226+
image_tags[image.parent]
227+
if not args.suffix
228+
else f"{image_tags[image.parent]}-{args.suffix}"
229+
)
231230
)
232231

233232
res = process_single_image(

tests/ci/docker_manifests_merge.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,8 @@
88
import sys
99
from typing import List, Tuple
1010

11-
# isort: off
1211
from github import Github
1312

14-
# isort: on
15-
1613
from clickhouse_helper import ClickHouseHelper, prepare_tests_results_for_clickhouse
1714
from commit_status_helper import format_description, get_commit, post_commit_status
1815
from docker_images_helper import docker_login, get_images_oredered_list

tests/ci/finish_check.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
#!/usr/bin/env python3
22
import logging
33

4-
# isort: off
54
from github import Github
65

7-
# isort: on
8-
96
from commit_status_helper import (
107
CI_STATUS_NAME,
118
get_commit,

tests/ci/merge_pr.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,10 @@
99
from pprint import pformat
1010
from typing import Dict, List
1111

12-
# isort: off
1312
from github.PaginatedList import PaginatedList
1413
from github.PullRequestReview import PullRequestReview
1514
from github.WorkflowRun import WorkflowRun
1615

17-
# isort: on
18-
1916
from commit_status_helper import get_commit_filtered_statuses
2017
from get_robot_token import get_best_robot_token
2118
from github_helper import GitHub, NamedUser, PullRequest, Repository

0 commit comments

Comments
 (0)