mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-14 19:45:11 +00:00
Merge pull request #49151 from ClickHouse/improve-test-reports
Improve test reports
This commit is contained in:
commit
464a3961d7
@ -142,6 +142,7 @@ if __name__ == "__main__":
|
||||
.replace("(", "_")
|
||||
.replace(")", "_")
|
||||
.replace(",", "_")
|
||||
.replace("/", "_")
|
||||
)
|
||||
|
||||
docker_image = get_image_with_version(reports_path, IMAGE_NAME)
|
||||
|
@ -262,17 +262,20 @@ class ReportColorTheme:
|
||||
ColorTheme = Tuple[str, str, str]
|
||||
|
||||
|
||||
def _format_header(header, branch_name, branch_url=None):
|
||||
result = " ".join([w.capitalize() for w in header.split(" ")])
|
||||
def _format_header(
|
||||
header: str, branch_name: str, branch_url: Optional[str] = None
|
||||
) -> str:
|
||||
# Following line does not lower CI->Ci and SQLancer->Sqlancer. It only
|
||||
# capitalizes the first letter and doesn't touch the rest of the word
|
||||
result = " ".join([w[0].upper() + w[1:] for w in header.split(" ") if w])
|
||||
result = result.replace("Clickhouse", "ClickHouse")
|
||||
result = result.replace("clickhouse", "ClickHouse")
|
||||
if "ClickHouse" not in result:
|
||||
result = "ClickHouse " + result
|
||||
result += " for "
|
||||
result = f"ClickHouse {result}"
|
||||
if branch_url:
|
||||
result += f'<a href="{branch_url}">{branch_name}</a>'
|
||||
result = f'{result} for <a href="{branch_url}">{branch_name}</a>'
|
||||
else:
|
||||
result += branch_name
|
||||
result = f"{result} for {branch_name}"
|
||||
return result
|
||||
|
||||
|
||||
|
@ -59,9 +59,10 @@ def upload_results(
|
||||
additional_files: List[str],
|
||||
check_name: str,
|
||||
) -> str:
|
||||
s3_path_prefix = f"{pr_number}/{commit_sha}/" + check_name.lower().replace(
|
||||
" ", "_"
|
||||
).replace("(", "_").replace(")", "_").replace(",", "_")
|
||||
normalized_check_name = check_name.lower()
|
||||
for r in ((" ", "_"), ("(", "_"), (")", "_"), (",", "_"), ("/", "_")):
|
||||
normalized_check_name = normalized_check_name.replace(*r)
|
||||
s3_path_prefix = f"{pr_number}/{commit_sha}/{normalized_check_name}"
|
||||
additional_urls = process_logs(
|
||||
s3_client, additional_files, s3_path_prefix, test_results
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user