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

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

Issue 1591003002: [Findit] Modify tryjob pipelines to trigger try jobs for test failure. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Created 4 years, 11 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/schedule_try_job_pipeline.py
diff --git a/appengine/findit/waterfall/schedule_try_job_pipeline.py b/appengine/findit/waterfall/schedule_try_job_pipeline.py
index ba04f57e2aa99124ba836926cd69fad2d02951bc..2e6ffaf896007d586f0f2918053e6f5d1eaf394a 100644
--- a/appengine/findit/waterfall/schedule_try_job_pipeline.py
+++ b/appengine/findit/waterfall/schedule_try_job_pipeline.py
@@ -12,34 +12,42 @@ from waterfall import waterfall_config
class ScheduleTryJobPipeline(BasePipeline):
"""A pipeline for scheduling a new tryjob for current build."""
- def _getBuildProperties(self, recipe, master_name, builder_name,
- good_revision, bad_revision, compile_targets):
-
+ def _getBuildProperties(
+ self, master_name, builder_name, good_revision, bad_revision,
+ try_job_type, compile_targets, targeted_tests):
properties = {
- 'recipe': recipe,
+ 'recipe': 'findit/chromium/%s' % try_job_type,
'good_revision': good_revision,
'bad_revision': bad_revision,
- 'target_mastername': master_name,
- 'target_buildername': builder_name
+ 'target_mastername': master_name
}
+ if try_job_type == 'compile':
+ properties['target_buildername'] = builder_name
+ else:
+ properties['target_testername'] = builder_name
+
+
if compile_targets:
lijeffrey 2016/01/16 00:27:12 maybe move |if compile_targets| into the try_job_t
chanli 2016/01/20 18:28:04 Done.
properties['compile_targets'] = compile_targets
+ if targeted_tests:
+ properties['tests'] = targeted_tests
+
return properties
# Arguments number differs from overridden method - pylint: disable=W0221
def run(
self, master_name, builder_name, build_number,
- good_revision, bad_revision, compile_targets):
+ good_revision, bad_revision, try_job_type,
+ compile_targets=None, targeted_tests=None):
tryserver_mastername, tryserver_buildername = (
waterfall_config.GetTrybotForWaterfallBuilder(
master_name, builder_name))
- recipe = 'findit/chromium/compile'
properties = self._getBuildProperties(
- recipe, master_name, builder_name, good_revision, bad_revision,
- compile_targets)
+ master_name, builder_name, good_revision, bad_revision,
+ try_job_type, compile_targets, targeted_tests)
try_job = buildbucket_client.TryJob(
tryserver_mastername, tryserver_buildername, None, properties, [])
@@ -50,7 +58,10 @@ class ScheduleTryJobPipeline(BasePipeline):
'Error "%s" occurred. Reason: "%s"' % (error.message, error.reason))
try_job_result = WfTryJob.Get(master_name, builder_name, build_number)
- try_job_result.compile_results.append({'try_job_id': build.id})
+ if try_job_type == 'compile':
+ try_job_result.compile_results.append({'try_job_id': build.id})
+ else:
+ try_job_result.test_results.append({'try_job_id': build.id})
try_job_result.put()
return build.id

Powered by Google App Engine
This is Rietveld 408576698