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

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: cleanup 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
(Empty)
1 # Copyright 2015 The Chromium Authors. All rights reserved.
chanli 2016/07/19 20:48:28 2015 -> 2016
caiw 2016/07/20 18:26:47 Done.
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 import logging
chanli 2016/07/19 20:48:28 Remove this import?
caiw 2016/07/20 18:26:47 Done.
7
8 from common import appengine_util
9 from common import constants
10 from common.pipeline_wrapper import BasePipeline
11
12 from model import analysis_status
13 from model.flake.master_flake_analysis import MasterFlakeAnalysis
14 from waterfall.trigger_flake_swarming_task_pipeline import (
15 TriggerFlakeSwarmingTaskPipeline)
16 from waterfall.process_flake_swarming_task_result_pipeline import (
17 ProcessFlakeSwarmingTaskResultPipeline)
18
19
20 class RecursiveFlakePipeline(BasePipeline):
21
22 # Arguments number differs from overridden method - pylint: disable=W0221
23 def run(self, master_name, builder_name, run_build_number, step_name,
24 test_name, master_build_number, queue_name=constants.DEFAULT_QUEUE):
25 # Call trigger pipeline (flake style)
lijeffrey 2016/07/19 22:44:10 nit: comments end with .
caiw 2016/07/20 18:26:47 Done.
26 task_id = yield TriggerFlakeSwarmingTaskPipeline(master_name, builder_name,
27 run_build_number, step_name, [test_name])
28 # Pass the trigger pipeline into a process pipeline
29 test_result_future = yield ProcessFlakeSwarmingTaskResultPipeline(
30 master_name, builder_name, run_build_number,
31 step_name, task_id, master_build_number, test_name)
32 yield NextBuildNumberPipeline(
33 master_name, builder_name, master_build_number,
34 step_name, test_name, test_result_future, queue_name)
35
36 class NextBuildNumberPipeline(BasePipeline):
37 # Arguments number differs from overridden method - pylint: disable=W0221
38 # Unused argument - pylint: disable=W0613
39 def run(self, master_name, builder_name, master_build_number, step_name,
40 test_name, test_result_future, queue_name):
41 # Get MasterFlakeAnalysis success list corresponding to parameters
chanli 2016/07/19 20:48:28 Nit: Gets ... and add '.' at the end.
42 master = MasterFlakeAnalysis.Get(master_name, builder_name,
43 master_build_number, step_name, test_name)
44 # Figure out what build_number we should call, if any
45 # This is a placeholder for testing:
46 next_run = False
47 if len(master.build_numbers) < 10:
lijeffrey 2016/07/19 22:44:10 It looks like 10 is used twice and not sure if it'
caiw 2016/07/20 18:26:47 So they aren't related, and also the algorithm (wh
48 #TODO(caiw): Develop algorithm to optimize this.
lijeffrey 2016/07/19 22:44:10 nit: space after #
caiw 2016/07/20 18:26:47 Done.
49 next_run = min(master.build_numbers) - 10
50 if next_run:
51 pipeline_job = RecursiveFlakePipeline(
52 master_name, builder_name, next_run, step_name, test_name,
53 master_build_number)
54 #pylint: disable=W0201
55 pipeline_job.target = appengine_util.GetTargetNameForModule(
56 constants.WATERFALL_BACKEND)
57 pipeline_job.start(queue_name=queue_name)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698