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

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

Issue 1866883002: [Findit] A huge refactoring and some bug fixing. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Fix nit. Created 4 years, 8 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 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 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 pipeline_wrapper import BasePipeline 5 from pipeline_wrapper import BasePipeline
6 from model import wf_analysis_status 6 from model import analysis_status
7 from model.wf_try_job import WfTryJob 7 from model.wf_try_job import WfTryJob
8 from waterfall.identify_try_job_culprit_pipeline import ( 8 from waterfall.identify_try_job_culprit_pipeline import (
9 IdentifyTryJobCulpritPipeline) 9 IdentifyTryJobCulpritPipeline)
10 from waterfall.monitor_try_job_pipeline import MonitorTryJobPipeline 10 from waterfall.monitor_try_job_pipeline import MonitorTryJobPipeline
11 from waterfall.schedule_try_job_pipeline import ScheduleTryJobPipeline 11 from waterfall.schedule_try_job_pipeline import ScheduleTryJobPipeline
12 12
13 13
14 class TryJobPipeline(BasePipeline): 14 class TryJobPipeline(BasePipeline):
15 """Root pipeline to start a try job on current build.""" 15 """Root pipeline to start a try job on current build."""
16 16
(...skipping 12 matching lines...) Expand all
29 """Marks the WfTryJob status as error, indicating that it was aborted. 29 """Marks the WfTryJob status as error, indicating that it was aborted.
30 30
31 Args: 31 Args:
32 was_aborted (bool): True if the pipeline was aborted due to some error 32 was_aborted (bool): True if the pipeline was aborted due to some error
33 or exception, otherwise False. 33 or exception, otherwise False.
34 """ 34 """
35 if was_aborted: 35 if was_aborted:
36 try_job_result = WfTryJob.Get( 36 try_job_result = WfTryJob.Get(
37 self.master_name, self.builder_name, self.build_number) 37 self.master_name, self.builder_name, self.build_number)
38 if try_job_result: # In case the result is deleted manually. 38 if try_job_result: # In case the result is deleted manually.
39 try_job_result.status = wf_analysis_status.ERROR 39 try_job_result.status = analysis_status.ERROR
40 try_job_result.put() 40 try_job_result.put()
41 41
42 def finalized(self): 42 def finalized(self):
43 """Finalizes this Pipeline after execution.""" 43 """Finalizes this Pipeline after execution."""
44 self._LogUnexpectedAbort(self.was_aborted) 44 self._LogUnexpectedAbort(self.was_aborted)
45 45
46 # Arguments number differs from overridden method - pylint: disable=W0221 46 # Arguments number differs from overridden method - pylint: disable=W0221
47 def run( 47 def run(
48 self, master_name, builder_name, build_number, good_revision, 48 self, master_name, builder_name, build_number, good_revision,
49 bad_revision, blame_list, try_job_type, compile_targets, targeted_tests): 49 bad_revision, blame_list, try_job_type, compile_targets, targeted_tests):
50 try_job_id = yield ScheduleTryJobPipeline( 50 try_job_id = yield ScheduleTryJobPipeline(
51 master_name, builder_name, build_number, good_revision, bad_revision, 51 master_name, builder_name, build_number, good_revision, bad_revision,
52 try_job_type, compile_targets, targeted_tests) 52 try_job_type, compile_targets, targeted_tests)
53 try_job_result = yield MonitorTryJobPipeline( 53 try_job_result = yield MonitorTryJobPipeline(
54 master_name, builder_name, build_number, try_job_type, try_job_id) 54 master_name, builder_name, build_number, try_job_type, try_job_id)
55 yield IdentifyTryJobCulpritPipeline( 55 yield IdentifyTryJobCulpritPipeline(
56 master_name, builder_name, build_number, blame_list, try_job_type, 56 master_name, builder_name, build_number, blame_list, try_job_type,
57 try_job_id, try_job_result) 57 try_job_id, try_job_result)
OLDNEW
« no previous file with comments | « appengine/findit/waterfall/trigger_swarming_task_pipeline.py ('k') | appengine/findit/waterfall/try_job_util.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698