mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-03 13:02:00 +00:00
Backport #62786 to 24.3: Tiny CI improvements
This commit is contained in:
parent
a2ba061188
commit
68df2c78af
@ -7,6 +7,10 @@ max-branches=50
|
||||
max-nested-blocks=10
|
||||
max-statements=200
|
||||
|
||||
[tool.isort]
|
||||
profile = "black"
|
||||
src_paths = ["src", "tests/ci", "tests/sqllogic"]
|
||||
|
||||
[tool.pylint.FORMAT]
|
||||
#ignore-long-lines = (# )?<?https?://\S+>?$
|
||||
|
||||
|
@ -10,11 +10,8 @@ from pathlib import Path
|
||||
from shutil import copy2
|
||||
from typing import List, Optional, Union
|
||||
|
||||
# isort: off
|
||||
from github.Commit import Commit
|
||||
|
||||
# isort: on
|
||||
|
||||
from build_download_helper import download_build_with_progress
|
||||
from commit_status_helper import post_commit_status
|
||||
from compress_files import SUFFIX, compress_fast, decompress_fast
|
||||
|
@ -8,11 +8,8 @@ import time
|
||||
from pathlib import Path
|
||||
from typing import Any, Callable, List, Optional, Union
|
||||
|
||||
# isort: off
|
||||
import requests
|
||||
|
||||
# isort: on
|
||||
|
||||
import get_robot_token as grt # we need an updated ROBOT_TOKEN
|
||||
from ci_config import CI_CONFIG
|
||||
|
||||
|
@ -139,7 +139,8 @@ def main():
|
||||
additional_files=[report_path],
|
||||
).dump()
|
||||
|
||||
if summary_status == ERROR:
|
||||
# We should fail the report job to rerun it in the following attempts
|
||||
if summary_status != SUCCESS:
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
|
@ -9,7 +9,6 @@ from dataclasses import asdict, dataclass
|
||||
from pathlib import Path
|
||||
from typing import Dict, List, Optional, Union
|
||||
|
||||
# isort: off
|
||||
from github import Github
|
||||
from github.Commit import Commit
|
||||
from github.CommitStatus import CommitStatus
|
||||
@ -18,8 +17,6 @@ from github.GithubObject import NotSet
|
||||
from github.IssueComment import IssueComment
|
||||
from github.Repository import Repository
|
||||
|
||||
# isort: on
|
||||
|
||||
from ci_config import CHECK_DESCRIPTIONS, REQUIRED_CHECKS, CheckDescription
|
||||
from env_helper import GITHUB_REPOSITORY, GITHUB_RUN_URL, TEMP_PATH
|
||||
from pr_info import SKIP_MERGEABLE_CHECK_LABEL, PRInfo
|
||||
|
@ -8,11 +8,8 @@ import sys
|
||||
from pathlib import Path
|
||||
from typing import List, Tuple
|
||||
|
||||
# isort: off
|
||||
from pip._vendor.packaging.version import Version
|
||||
|
||||
# isort: on
|
||||
|
||||
from build_download_helper import download_builds_filter
|
||||
from docker_images_helper import DockerImage, get_docker_image, pull_image
|
||||
from env_helper import REPORT_PATH, TEMP_PATH
|
||||
|
@ -8,11 +8,8 @@ import time
|
||||
from pathlib import Path
|
||||
from typing import List, Optional, Tuple
|
||||
|
||||
# isort: off
|
||||
from github import Github
|
||||
|
||||
# isort: on
|
||||
|
||||
from clickhouse_helper import ClickHouseHelper, prepare_tests_results_for_clickhouse
|
||||
from commit_status_helper import format_description, get_commit, post_commit_status
|
||||
from docker_images_helper import DockerImageData, docker_login, get_images_oredered_list
|
||||
@ -225,9 +222,11 @@ def main():
|
||||
parent_version = (
|
||||
None
|
||||
if not image.parent
|
||||
else image_tags[image.parent]
|
||||
if not args.suffix
|
||||
else f"{image_tags[image.parent]}-{args.suffix}"
|
||||
else (
|
||||
image_tags[image.parent]
|
||||
if not args.suffix
|
||||
else f"{image_tags[image.parent]}-{args.suffix}"
|
||||
)
|
||||
)
|
||||
|
||||
res = process_single_image(
|
||||
|
@ -8,11 +8,8 @@ import subprocess
|
||||
import sys
|
||||
from typing import List, Tuple
|
||||
|
||||
# isort: off
|
||||
from github import Github
|
||||
|
||||
# isort: on
|
||||
|
||||
from clickhouse_helper import ClickHouseHelper, prepare_tests_results_for_clickhouse
|
||||
from commit_status_helper import format_description, get_commit, post_commit_status
|
||||
from docker_images_helper import docker_login, get_images_oredered_list
|
||||
|
@ -1,11 +1,8 @@
|
||||
#!/usr/bin/env python3
|
||||
import logging
|
||||
|
||||
# isort: off
|
||||
from github import Github
|
||||
|
||||
# isort: on
|
||||
|
||||
from commit_status_helper import (
|
||||
CI_STATUS_NAME,
|
||||
get_commit,
|
||||
|
@ -9,13 +9,10 @@ from os import getenv
|
||||
from pprint import pformat
|
||||
from typing import Dict, List
|
||||
|
||||
# isort: off
|
||||
from github.PaginatedList import PaginatedList
|
||||
from github.PullRequestReview import PullRequestReview
|
||||
from github.WorkflowRun import WorkflowRun
|
||||
|
||||
# isort: on
|
||||
|
||||
from commit_status_helper import get_commit_filtered_statuses
|
||||
from get_robot_token import get_best_robot_token
|
||||
from github_helper import GitHub, NamedUser, PullRequest, Repository
|
||||
|
@ -9,11 +9,8 @@ import sys
|
||||
import traceback
|
||||
from pathlib import Path
|
||||
|
||||
# isort: off
|
||||
from github import Github
|
||||
|
||||
# isort: on
|
||||
|
||||
from build_download_helper import download_builds_filter
|
||||
from ci_config import CI_CONFIG
|
||||
from clickhouse_helper import get_instance_id, get_instance_type
|
||||
|
@ -6,12 +6,8 @@ import re
|
||||
from typing import Dict, List, Set, Union
|
||||
from urllib.parse import quote
|
||||
|
||||
# isort: off
|
||||
# for some reason this line moves to the end
|
||||
from unidiff import PatchSet # type: ignore
|
||||
|
||||
# isort: on
|
||||
|
||||
from build_download_helper import get_gh_api
|
||||
from env_helper import (
|
||||
GITHUB_EVENT_PATH,
|
||||
|
@ -3,11 +3,9 @@ import logging
|
||||
import sys
|
||||
from typing import Tuple
|
||||
|
||||
# isort: off
|
||||
from github import Github
|
||||
|
||||
# isort: on
|
||||
|
||||
from cherry_pick import Labels
|
||||
from commit_status_helper import (
|
||||
CI_STATUS_NAME,
|
||||
create_ci_report,
|
||||
@ -26,7 +24,6 @@ from lambda_shared_package.lambda_shared.pr import (
|
||||
)
|
||||
from pr_info import PRInfo
|
||||
from report import FAILURE, PENDING, SUCCESS
|
||||
from cherry_pick import Labels
|
||||
|
||||
TRUSTED_ORG_IDS = {
|
||||
54801242, # clickhouse
|
||||
|
@ -10,11 +10,8 @@ import multiprocessing
|
||||
import os
|
||||
from functools import reduce
|
||||
|
||||
# isort: off
|
||||
from deepdiff import DeepDiff # pylint:disable=import-error; for style check
|
||||
|
||||
# isort: on
|
||||
|
||||
from connection import Engines, default_clickhouse_odbc_conn_str, setup_connection
|
||||
from test_runner import RequestType, Status, TestRunner
|
||||
|
||||
|
@ -7,14 +7,10 @@ from functools import reduce
|
||||
from hashlib import md5
|
||||
from itertools import chain
|
||||
|
||||
# isort: off
|
||||
# pylint:disable=import-error; for style check
|
||||
import sqlglot
|
||||
from sqlglot.expressions import ColumnDef, PrimaryKeyColumnConstraint
|
||||
|
||||
# pylint:enable=import-error; for style check
|
||||
# isort: on
|
||||
|
||||
from exceptions import (
|
||||
DataResultDiffer,
|
||||
Error,
|
||||
@ -23,6 +19,9 @@ from exceptions import (
|
||||
QueryExecutionError,
|
||||
)
|
||||
|
||||
# pylint:enable=import-error; for style check
|
||||
|
||||
|
||||
logger = logging.getLogger("parser")
|
||||
logger.setLevel(logging.DEBUG)
|
||||
|
||||
@ -474,9 +473,11 @@ class QueryResult:
|
||||
f"values_count: {self.values_count}" if self.values_count else "",
|
||||
f"data_hash: {self.data_hash}" if self.data_hash else "",
|
||||
f"exception: {self.exception}" if self.exception else "",
|
||||
f"hash_threshold: {self.hash_threshold}"
|
||||
if self.hash_threshold
|
||||
else "",
|
||||
(
|
||||
f"hash_threshold: {self.hash_threshold}"
|
||||
if self.hash_threshold
|
||||
else ""
|
||||
),
|
||||
]
|
||||
if x
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user