From 5cda89f19216afec14fad4775ca4d4ba07418703 Mon Sep 17 00:00:00 2001 From: Austin Anderson <angerson@google.com> Date: Mon, 20 Nov 2023 12:48:25 -0800 Subject: [PATCH] Fix busted nightly_job_basis and add warning --- tf_oss_dashboard/dashboard.py | 7 +++++-- tf_oss_dashboard/tensorflow.yaml | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/tf_oss_dashboard/dashboard.py b/tf_oss_dashboard/dashboard.py index 3b76651..4f543c1 100755 --- a/tf_oss_dashboard/dashboard.py +++ b/tf_oss_dashboard/dashboard.py @@ -139,8 +139,11 @@ 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 YAML_CONFIG["nightly_job_basis"]: - nightlies = job_names_to_records[YAML_CONFIG["nightly_job_basis"]] +if "nightly_job_basis" in YAML_CONFIG: + basis = YAML_CONFIG["nightly_job_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] for name, records in job_names_to_records.items(): for record in records: for nightly in nightlies: diff --git a/tf_oss_dashboard/tensorflow.yaml b/tf_oss_dashboard/tensorflow.yaml index 2a98344..ed10b5b 100644 --- a/tf_oss_dashboard/tensorflow.yaml +++ b/tf_oss_dashboard/tensorflow.yaml @@ -110,7 +110,7 @@ default_category: Everything Else # Use this to determine which commits are the Nightly ones when comparing. # Set it to false to disable all "Nightly" features (i.e. the "in nightly..." # or "this is nightly" badge in a commit) -nightly_job_basis: Nightly - Code Check - Linux +nightly_job_basis: Nightly - Code Check (Full) # Configures how large a job card can grow (that is, how many dots will appear # on it). A date tag is size 3, and a status dot is size 1. maximum_card_size: 100 -- GitLab