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

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

Issue 1778153002: [Findit] Strip platform from step_name before triggering try job. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Created 4 years, 9 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
« no previous file with comments | « appengine/findit/waterfall/test/try_job_util_test.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 738c9f197b04544868ed28dd02e2cb56a7c1eeea..e287e394248898d86ac18044061459eee6871cb4 100644
--- a/appengine/findit/waterfall/try_job_util.py
+++ b/appengine/findit/waterfall/try_job_util.py
@@ -79,6 +79,17 @@ def _CheckIfNeedNewTryJobForTestFailure(
return targeted_tests, need_new_try_job, last_pass
+def _StripPlatform(targeted_tests):
lijeffrey 2016/03/10 00:43:56 nit: just for clarity maybe rename this '_GetTarge
chanli 2016/03/10 23:31:51 Function deleted.
+ if not targeted_tests:
+ return None
+
+ updated_tests = {}
+ for step_name, tests in targeted_tests.iteritems():
+ updated_tests[step_name.strip()[0]] = tests
stgao 2016/03/10 00:39:30 How about using the value of tag "name" in the Swa
lijeffrey 2016/03/10 00:43:56 are you sure you want step_name.strip()[0]? I thin
chanli 2016/03/10 23:31:51 Right... I wanted to use split... Done
chanli 2016/03/10 23:31:51 You're right, and actually this patch won't work b
+
+ return updated_tests
+
+
@ndb.transactional
def _NeedANewTryJob(
master_name, builder_name, build_number, failed_steps, failure_result_map):
@@ -114,6 +125,8 @@ def _NeedANewTryJob(
master_name, builder_name, build_number)
try_job.put()
+ targeted_tests = _StripPlatform(targeted_tests)
+
return need_new_try_job, last_pass, try_job_type, targeted_tests
« no previous file with comments | « appengine/findit/waterfall/test/try_job_util_test.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698