From 0b1326fd3eba53796dc50aaca34c0e32871879df Mon Sep 17 00:00:00 2001 From: Vasily Nemkov Date: Thu, 8 Feb 2024 15:58:02 +0100 Subject: [PATCH 1/2] Attempt to fix SignRelease job --- tests/ci/sign_release.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/ci/sign_release.py b/tests/ci/sign_release.py index 701ccc29b65b..2f22d503c153 100644 --- a/tests/ci/sign_release.py +++ b/tests/ci/sign_release.py @@ -7,6 +7,7 @@ from pr_info import PRInfo from build_download_helper import download_builds_filter import hashlib +from pathlib import Path GPG_BINARY_SIGNING_KEY = os.getenv("GPG_BINARY_SIGNING_KEY") GPG_BINARY_SIGNING_PASSPHRASE = os.getenv("GPG_BINARY_SIGNING_PASSPHRASE") @@ -57,9 +58,9 @@ def main(): s3_helper = S3Helper() - s3_path_prefix = f"{pr_info.number}/{pr_info.sha}/" + CHECK_NAME.lower().replace( + s3_path_prefix = Path(f"{pr_info.number}/{pr_info.sha}/" + CHECK_NAME.lower().replace( " ", "_" - ).replace("(", "_").replace(")", "_").replace(",", "_") + ).replace("(", "_").replace(")", "_").replace(",", "_")) # downloads `package_release` artifacts generated download_builds_filter(CHECK_NAME, reports_path, TEMP_PATH) @@ -68,8 +69,8 @@ def main(): full_path = os.path.join(TEMP_PATH, f) hashed_file_path = hash_file(full_path) signed_file_path = sign_file(hashed_file_path) - s3_path = f'{s3_path_prefix}/{os.path.basename(signed_file_path)}' - s3_helper.upload_build_file_to_s3(signed_file_path, s3_path) + s3_path = s3_path_prefix / os.path.basename(signed_file_path) + s3_helper.upload_build_file_to_s3(Path(signed_file_path), s3_path) print(f'Uploaded file {signed_file_path} to {s3_path}') # Signed hashes are: From f2e7646413d4bf97698274c8de397d91506fea0a Mon Sep 17 00:00:00 2001 From: MyroTk <44327070+MyroTk@users.noreply.github.com> Date: Thu, 8 Feb 2024 17:03:58 -0800 Subject: [PATCH 2/2] Pass s3_path as str to s3_helper --- tests/ci/sign_release.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/ci/sign_release.py b/tests/ci/sign_release.py index 2f22d503c153..872966a578a5 100644 --- a/tests/ci/sign_release.py +++ b/tests/ci/sign_release.py @@ -70,7 +70,7 @@ def main(): hashed_file_path = hash_file(full_path) signed_file_path = sign_file(hashed_file_path) s3_path = s3_path_prefix / os.path.basename(signed_file_path) - s3_helper.upload_build_file_to_s3(Path(signed_file_path), s3_path) + s3_helper.upload_build_file_to_s3(Path(signed_file_path), str(s3_path)) print(f'Uploaded file {signed_file_path} to {s3_path}') # Signed hashes are: