Robust validate_step_info in generate_stats.py

If there is a warning during validate_step_info and the step_info is
None, the script should not attempt to update that step in the
Spreadsheet object.

Bug: angleproject:4030
Change-Id: Ib94ba82219745ee4ab36c52e9b1d3a04a76a05d2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1872569
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
This commit is contained in:
Jonah Ryan-Davis
2019-10-21 15:46:46 -04:00
committed by Commit Bot
parent f228038dde
commit 5335faaece

View File

@@ -353,10 +353,7 @@ def get_step_info(build_name, step_name):
append_errors.append(key)
LOGGER.warning("Too many characters in column '" + key +
"'. Output capped.")
if validate_step_info(step_info, build_name, step_name):
return step_info
return None
return step_info
# Returns the info for each step run on a given bot_name.
@@ -365,7 +362,11 @@ def get_bot_info(bot_name):
info['step_names'] = get_step_names(info['build_name'])
for step_name in info['step_names']:
LOGGER.info("Parsing step '" + step_name + "'...")
info[step_name] = get_step_info(info['build_name'], step_name)
step_info = get_step_info(info['build_name'], step_name)
if validate_step_info(step_info, info['build_name'], step_name):
info[step_name] = step_info
else:
info['step_names'].remove(step_name)
return info