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

Side by Side Diff: appengine/findit/waterfall/flake/recursive_flake_pipeline.py

Issue 2130543004: Waterfall components of regression range finder. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: addressed comments, added trigger test which somehow wasn't included last time 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.
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 datetime import datetime
6
7 from common import appengine_util
8 from common import constants
9 from common.pipeline_wrapper import BasePipeline
10
11 from model import analysis_status
12 from model.flake.master_flake_analysis import MasterFlakeAnalysis
13 from waterfall.trigger_flake_swarming_task_pipeline import (
14 TriggerFlakeSwarmingTaskPipeline)
15 from waterfall.process_flake_swarming_task_result_pipeline import (
16 ProcessFlakeSwarmingTaskResultPipeline)
17
18
19 class RecursiveFlakePipeline(BasePipeline):
20
21 # Arguments number differs from overridden method - pylint: disable=W0221
22 def run(self, master_name, builder_name, run_build_number, step_name,
23 test_name, master_build_number, queue_name=constants.DEFAULT_QUEUE):
24 # Call trigger pipeline (flake style).
25 task_id = yield TriggerFlakeSwarmingTaskPipeline(master_name, builder_name,
26 run_build_number, step_name, [test_name])
27 # Pass the trigger pipeline into a process pipeline.
28 test_result_future = yield ProcessFlakeSwarmingTaskResultPipeline(
29 master_name, builder_name, run_build_number,
30 step_name, task_id, master_build_number, test_name)
31 yield NextBuildNumberPipeline(
32 master_name, builder_name, master_build_number,
33 step_name, test_name, test_result_future, queue_name)
34
35 class NextBuildNumberPipeline(BasePipeline):
36 # Arguments number differs from overridden method - pylint: disable=W0221
37 # Unused argument - pylint: disable=W0613
38 def run(self, master_name, builder_name, master_build_number, step_name,
39 test_name, test_result_future, queue_name):
40 # Get MasterFlakeAnalysis success list corresponding to parameters.
41 master = MasterFlakeAnalysis.Get(master_name, builder_name,
42 master_build_number, step_name, test_name)
43 # Figure out what build_number we should call, if any
44 # This is a placeholder for testing:
lijeffrey 2016/07/26 20:49:02 What do you mean this is a placeholder for testing
caiw 2016/07/26 21:09:01 I think I addressed this and the comment about the
45 next_run = False
46 if len(master.build_numbers) < 10:
lijeffrey 2016/07/26 20:49:02 nit: Move 10 to a constant at the top of the file
caiw 2016/07/26 21:09:01 Acknowledged.
47 # TODO(caiw): Develop algorithm to optimize this.
48 next_run = min(master.build_numbers) - 10
49 if next_run:
50 pipeline_job = RecursiveFlakePipeline(
51 master_name, builder_name, next_run, step_name, test_name,
52 master_build_number)
53 #pylint: disable=W0201
54 pipeline_job.target = appengine_util.GetTargetNameForModule(
55 constants.WATERFALL_BACKEND)
56 pipeline_job.start(queue_name=queue_name)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698