From f13dab62963dc50572359592a2cbda04b913de0e Mon Sep 17 00:00:00 2001 From: a-maurice Date: Tue, 2 Jun 2026 16:52:12 -0700 Subject: [PATCH 1/2] Change nightly status script to not depend on time --- scripts/gha/report_build_status.py | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/scripts/gha/report_build_status.py b/scripts/gha/report_build_status.py index 6bfcf887b7..6e9d0598ea 100644 --- a/scripts/gha/report_build_status.py +++ b/scripts/gha/report_build_status.py @@ -127,9 +127,6 @@ _FLAKY_TEXT = "Pass (flaky)" _MISSING_TEXT = "Missing" -general_test_hour = 9 -firestore_test_hour = 10 - def rename_key(old_dict,old_name,new_name): """Rename a key in a dictionary, preserving the order.""" new_dict = {} @@ -382,16 +379,20 @@ def main(argv): run['date'] = dateutil.parser.parse(run['created_at'], ignoretz=True) run['day'] = run['date'].date() day = str(run['date'].date()) - if day in source_tests: continue + if not FLAGS.firestore and day in source_tests: continue + if day in source_tests: + prev_date = source_tests[day]['date'].date() + # Non-Firestore wants to keep the earliest, otherwise the latest + if not FLAGS.firestore and prev_date < run['date'].date(): + continue + elif FLAGS.firestore and prev_date > run['date'].date(): + continue + if run['event'] != 'schedule': continue if run['status'] != 'completed': continue if run['day'] < start_date or run['day'] > end_date: continue run['duration'] = dateutil.parser.parse(run['updated_at'], ignoretz=True) - run['date'] - compare_test_hour = firestore_test_hour if FLAGS.firestore else general_test_hour - # The scheduled time is at the top of the hour (e.g. 09:00 or 10:00). - # We allow for some delay in GitHub Actions starting the job, as long as it starts in the same hour. - if run['date'].hour == compare_test_hour: - source_tests[day] = run - all_days.add(day) + source_tests[day] = run + all_days.add(day) workflow_id = _WORKFLOW_PACKAGING all_runs = firebase_github.list_workflow_runs(FLAGS.token, workflow_id, _BRANCH, 'schedule', _LIMIT) From b97f681b43996238e55ae54e8f83a9fc5524211b Mon Sep 17 00:00:00 2001 From: a-maurice Date: Tue, 2 Jun 2026 17:09:10 -0700 Subject: [PATCH 2/2] Update report_build_status.py --- scripts/gha/report_build_status.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/scripts/gha/report_build_status.py b/scripts/gha/report_build_status.py index 6e9d0598ea..3126fe72ba 100644 --- a/scripts/gha/report_build_status.py +++ b/scripts/gha/report_build_status.py @@ -379,17 +379,16 @@ def main(argv): run['date'] = dateutil.parser.parse(run['created_at'], ignoretz=True) run['day'] = run['date'].date() day = str(run['date'].date()) - if not FLAGS.firestore and day in source_tests: continue + if run['event'] != 'schedule': continue + if run['status'] != 'completed': continue + if run['day'] < start_date or run['day'] > end_date: continue if day in source_tests: - prev_date = source_tests[day]['date'].date() + prev_date = source_tests[day]['date'] # Non-Firestore wants to keep the earliest, otherwise the latest - if not FLAGS.firestore and prev_date < run['date'].date(): + if not FLAGS.firestore and prev_date < run['date']: continue - elif FLAGS.firestore and prev_date > run['date'].date(): + elif FLAGS.firestore and prev_date > run['date']: continue - if run['event'] != 'schedule': continue - if run['status'] != 'completed': continue - if run['day'] < start_date or run['day'] > end_date: continue run['duration'] = dateutil.parser.parse(run['updated_at'], ignoretz=True) - run['date'] source_tests[day] = run all_days.add(day)