Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(60)

Unified Diff: appengine/findit/waterfall/try_job_util.py

Issue 2232613002: Chop off platform name from step name (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: appengine/findit/waterfall/try_job_util.py
diff --git a/appengine/findit/waterfall/try_job_util.py b/appengine/findit/waterfall/try_job_util.py
index eaa4209bf663a6f600d080d825e16ffdbfdb6733..8589463b977dea98d75b6f483ecb5c89587f52a3 100644
--- a/appengine/findit/waterfall/try_job_util.py
+++ b/appengine/findit/waterfall/try_job_util.py
@@ -144,6 +144,20 @@ def _GetStepsAndTests(failed_steps):
return sorted(failed_steps_and_tests)
+def _ChopOffPlatformFromStepName(step_name):
lijeffrey 2016/08/10 18:48:08 nit: rename this function '_RemovePlatformFromStep
josiahk 2016/08/10 21:22:34 Done.
+ """Returns chopped off version of step name.
+
+ Args:
+ step_name: Raw step name. Example: "net_unittests on Windows-10"
lijeffrey 2016/08/10 18:48:08 single quotes for strings
josiahk 2016/08/10 21:22:34 Done.
+
+ Returns:
+ Step name without platform. Example: "net_unittests on "
+ """
+ if ' on ' in step_name:
+ return step_name[:step_name.find(' on ') + 4]
lijeffrey 2016/08/10 18:48:08 4? what's this magic number and why is it being us
josiahk 2016/08/10 21:22:35 Fixed!
+ return step_name
+
+
def GetSuspectedCLsWithFailures(heuristic_result):
"""Generates a list of suspected CLs with failures.
@@ -172,13 +186,13 @@ def GetSuspectedCLsWithFailures(heuristic_result):
for test in failure['tests']:
for suspected_cl in test.get('suspected_cls', []):
suspected_cls_with_failures.append([
- failure['step_name'],
+ _ChopOffPlatformFromStepName(failure['step_name']),
suspected_cl['revision'],
test['test_name']])
else:
for suspected_cl in failure['suspected_cls']:
suspected_cls_with_failures.append([
- failure['step_name'],
+ _ChopOffPlatformFromStepName(failure['step_name']),
suspected_cl['revision'],
None])
@@ -318,7 +332,6 @@ def _NeedANewTryJob(
'step', master_name, builder_name, build_number, failure_result_map,
failed_steps))
-
need_new_try_job = (
need_new_try_job and ReviveOrCreateTryJobEntity(
master_name, builder_name, build_number, force_try_job))

Powered by Google App Engine
This is Rietveld 408576698