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

Side by Side Diff: appengine/findit/waterfall/start_try_job_on_demand_pipeline.py

Issue 2026283002: [Findit] Adding logic to force try jobs regardless of bailout or previous results (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Addressing comments and rebase Created 4 years, 5 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 unified diff | Download patch
OLDNEW
1 # Copyright 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 from common.pipeline_wrapper import BasePipeline 5 from common.pipeline_wrapper import BasePipeline
6 from common.waterfall import failure_type
7 from model.wf_analysis import WfAnalysis 6 from model.wf_analysis import WfAnalysis
8 from waterfall import try_job_util 7 from waterfall import try_job_util
9 8
10 9
11 class StartTryJobOnDemandPipeline(BasePipeline): 10 class StartTryJobOnDemandPipeline(BasePipeline):
12 11
13 # Arguments number differs from overridden method - pylint: disable=W0221 12 # Arguments number differs from overridden method - pylint: disable=W0221
14 def run(self, failure_info, signals, build_completed, heuristic_result): 13 def run(self, failure_info, signals, build_completed, force_try_job,
14 heuristic_result):
15 """Starts a try job if one is needed for the given failure.""" 15 """Starts a try job if one is needed for the given failure."""
16 if not build_completed: # Only start try-jobs for completed builds. 16 if not build_completed: # Only start try-jobs for completed builds.
17 return False 17 return False
18 18
19 failure_result_map = try_job_util.ScheduleTryJobIfNeeded( 19 failure_result_map = try_job_util.ScheduleTryJobIfNeeded(
20 failure_info, signals=signals, heuristic_result=heuristic_result) 20 failure_info, signals=signals, heuristic_result=heuristic_result,
21 force_try_job=force_try_job)
21 22
22 # Save reference to the try-jobs if any was scheduled. 23 # Save reference to the try-jobs if any was scheduled.
23 master_name = failure_info['master_name'] 24 master_name = failure_info['master_name']
24 builder_name = failure_info['builder_name'] 25 builder_name = failure_info['builder_name']
25 build_number = failure_info['build_number'] 26 build_number = failure_info['build_number']
26 analysis = WfAnalysis.Get(master_name, builder_name, build_number) 27 analysis = WfAnalysis.Get(master_name, builder_name, build_number)
27 analysis.failure_result_map = failure_result_map 28 analysis.failure_result_map = failure_result_map
28 analysis.put() 29 analysis.put()
29 return True 30 return True
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698