Skip to content

Commit

Permalink
Ignore test analytics failures
Browse files Browse the repository at this point in the history
Not being able to decrypt the test analytics token should not stop the build.

Part of bazelbuild#1708
  • Loading branch information
fweikert committed Jul 6, 2024
1 parent ad86e67 commit 3663fad
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions buildkite/bazelci.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 3663fad

Please sign in to comment.