From 7cd5a35e6d362aa7a72cf7a594d873e0e1d77b69 Mon Sep 17 00:00:00 2001 From: Austin Anderson <angerson@google.com> Date: Mon, 20 Nov 2023 12:55:59 -0800 Subject: [PATCH] Handle nightly_job_basis being set but falsy --- tf_oss_dashboard/dashboard.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tf_oss_dashboard/dashboard.py b/tf_oss_dashboard/dashboard.py index 4f543c1..b6136a0 100755 --- a/tf_oss_dashboard/dashboard.py +++ b/tf_oss_dashboard/dashboard.py @@ -139,8 +139,8 @@ for record in all_records: # included in the nightly jobs if it was committed before a nightly job's # commit. This way we can quickly tell when a commit was first tested in a TF # Nightly test. -if "nightly_job_basis" in YAML_CONFIG: - basis = YAML_CONFIG["nightly_job_basis"] +basis = YAML_CONFIG.get("nightly_job_basis", False) +if basis: if basis not in job_names_to_records: exit(f"nightly_job_basis has been set to '{basis}', but those results are missing. Is the configuration correct?") nightlies = job_names_to_records[basis] -- GitLab