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

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

Issue 2187763004: [Findit] Refactor Findit pipeline. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Fix nits after preliminary check. 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 unified diff | Download patch
OLDNEW
(Empty)
1 # Copyright 2016 The Chromium Authors. All rights reserved.
Sharu Jiang 2016/08/04 06:21:12 I think that 'schedule_compile_try_job_pipeline' a
chanli 2016/08/05 19:53:54 They are not duplicates, in fact I have ScheduleTr
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 from common.waterfall import failure_type
6 from model.wf_try_job import WfTryJob
7 from waterfall.schedule_try_job_pipeline import ScheduleTryJobPipeline
8
9
10 class ScheduleCompileTryJobPipeline(ScheduleTryJobPipeline):
11 """A pipeline for scheduling a new try job for failed compile build."""
12
13 def _GetBuildProperties(
14 self, master_name, builder_name, build_number, good_revision,
15 bad_revision, try_job_type, suspected_revisions):
16 properties = super(ScheduleCompileTryJobPipeline, self)._GetBuildProperties(
Sharu Jiang 2016/08/04 06:21:12 Why not just use self._GetBuildProperties? it's al
chanli 2016/08/05 19:53:53 I'm not sure if I understand you... I need to add
17 master_name, builder_name, build_number, good_revision,
18 bad_revision, try_job_type, suspected_revisions)
19 properties['target_buildername'] = builder_name
20
21 return properties
22
23 # Arguments number differs from overridden method - pylint: disable=W0221
24 def run(
25 self, master_name, builder_name, build_number, good_revision,
26 bad_revision, try_job_type, compile_targets, suspected_revisions):
lijeffrey 2016/08/04 10:31:47 so since this is for compile only, do we still nee
chanli 2016/08/05 19:53:54 we need try_job_type to choose the recipe in _GetB
27
28 properties = self._GetBuildProperties(
29 master_name, builder_name, build_number, good_revision, bad_revision,
30 try_job_type, suspected_revisions)
31 additional_parameters = {'compile_targets': compile_targets}
32
33 build_id = self._TriggerTryJob(
34 master_name, builder_name, properties, additional_parameters)
35
36 try_job_result = WfTryJob.Get(master_name, builder_name, build_number)
37 try_job_result.compile_results.append({'try_job_id': build_id})
38 try_job_result.try_job_ids.append(build_id)
39 try_job_result.put()
40
41 # Create a corresponding WfTryJobData entity to capture as much metadata as
42 # early as possible.
43 self._CreateTryJobData(
44 build_id, master_name, builder_name, build_number,
45 failure_type.GetDescriptionForFailureType(try_job_type),
46 bool(compile_targets), bool(suspected_revisions))
47
48 return build_id
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698