diff --git a/src/appengine/handlers/cron/fuzz_strategy_selection.py b/src/appengine/handlers/cron/fuzz_strategy_selection.py index 9b5a15e4b2..a5ca97ce9a 100644 --- a/src/appengine/handlers/cron/fuzz_strategy_selection.py +++ b/src/appengine/handlers/cron/fuzz_strategy_selection.py @@ -27,6 +27,7 @@ from google_cloud_utils import big_query from handlers import base_handler from libs import handler +from metrics import logs HIGH_TEMPERATURE_PARAMETER = .75 MEDIUM_TEMPERATURE_PARAMETER = .5 @@ -176,9 +177,13 @@ def _store_probabilities_in_bigquery(data): } bigquery_data.append(big_query.Insert(row=bigquery_row, insert_id=None)) - client = big_query.Client( - dataset_id='main', table_id='fuzz_strategy_experiments') - client.insert(bigquery_data) + if bigquery_data: + client = big_query.Client( + dataset_id='main', table_id='fuzz_strategy_experiments') + client.insert(bigquery_data) + else: + logs.log("No fuzz strategy distribution data was found to upload to " + "BigQuery.") def _query_and_upload_strategy_probabilities():