Commit 5335faae by Jonah Ryan-Davis Committed by Commit Bot

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/+/1872569Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
parent f228038d
...@@ -353,10 +353,7 @@ def get_step_info(build_name, step_name): ...@@ -353,10 +353,7 @@ def get_step_info(build_name, step_name):
append_errors.append(key) append_errors.append(key)
LOGGER.warning("Too many characters in column '" + key + LOGGER.warning("Too many characters in column '" + key +
"'. Output capped.") "'. Output capped.")
return step_info
if validate_step_info(step_info, build_name, step_name):
return step_info
return None
# Returns the info for each step run on a given bot_name. # Returns the info for each step run on a given bot_name.
...@@ -365,7 +362,11 @@ def get_bot_info(bot_name): ...@@ -365,7 +362,11 @@ def get_bot_info(bot_name):
info['step_names'] = get_step_names(info['build_name']) info['step_names'] = get_step_names(info['build_name'])
for step_name in info['step_names']: for step_name in info['step_names']:
LOGGER.info("Parsing step '" + step_name + "'...") 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 return info
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment