From 3663fad8b43d315b6d66841f8dbda5c8b73460b5 Mon Sep 17 00:00:00 2001 From: Florian Weikert Date: Sat, 6 Jul 2024 13:30:31 +0200 Subject: [PATCH] Ignore test analytics failures Not being able to decrypt the test analytics token should not stop the build. Part of https://github.com/bazelbuild/continuous-integration/issues/1708 --- buildkite/bazelci.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/buildkite/bazelci.py b/buildkite/bazelci.py index 468f9aa186..b4d9952c27 100755 --- a/buildkite/bazelci.py +++ b/buildkite/bazelci.py @@ -1431,11 +1431,16 @@ def PrepareRepoInCwd(print_cmd_groups, initial_setup=False): else: kms_key = "buildkite-untrusted-api-token" project = "bazel-untrusted" - os.environ["BUILDKITE_ANALYTICS_TOKEN"] = decrypt_token( - encrypted_token=os.environ["ENCRYPTED_BUILDKITE_ANALYTICS_TOKEN"], - kms_key=kms_key, - project=project, - ) + + try: + os.environ["BUILDKITE_ANALYTICS_TOKEN"] = decrypt_token( + encrypted_token=os.environ["ENCRYPTED_BUILDKITE_ANALYTICS_TOKEN"], + kms_key=kms_key, + project=project, + ) + except Exception as ex: + print_collapsed_group(":rotating_light: Test analytics disabled due to an error :warning:") + eprint(ex) test_bep_file = os.path.join(tmpdir, _TEST_BEP_FILE) with concurrent.futures.ThreadPoolExecutor() as executor: