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

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

Issue 2272953002: [Findit] Moving check flake parameters to config (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Updating swarming settings config example Created 4 years, 3 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 from google.appengine.ext import ndb 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.
2 4
3 import logging 5 from model.flake.flake_swarming_task import FlakeSwarmingTask
4 6 from waterfall import waterfall_config
5 from waterfall.trigger_base_swarming_task_pipeline import( 7 from waterfall.trigger_base_swarming_task_pipeline import(
6 TriggerBaseSwarmingTaskPipeline) 8 TriggerBaseSwarmingTaskPipeline)
7 from model.flake.flake_swarming_task import FlakeSwarmingTask 9
10
8 class TriggerFlakeSwarmingTaskPipeline(TriggerBaseSwarmingTaskPipeline): 11 class TriggerFlakeSwarmingTaskPipeline(TriggerBaseSwarmingTaskPipeline):
9 """A pipeline to check if selected tests of a step are flaky. 12 """A pipeline to check if selected tests of a step are flaky.
10 13
11 This pipeline only supports test steps that run on Swarming and support the 14 This pipeline only supports test steps that run on Swarming and support the
12 gtest filter. 15 gtest filter.
13 """ 16 """
14 #pylint: disable=arguments-differ 17
15 def _GetSwarmingTask(self,master_name, builder_name, build_number, 18 # pylint: disable=arguments-differ
19 def _GetSwarmingTask(self, master_name, builder_name, build_number,
16 step_name, test_name): 20 step_name, test_name):
17 # Get the appropriate kind of Swarming Task (Flake). 21 # Get the appropriate kind of Swarming Task (Flake).
18 swarming_task = FlakeSwarmingTask.Get( 22 swarming_task = FlakeSwarmingTask.Get(
19 master_name, builder_name, build_number, step_name, test_name) 23 master_name, builder_name, build_number, step_name, test_name)
20 return swarming_task 24 return swarming_task
21 25
22 #pylint: disable=arguments-differ 26 # pylint: disable=arguments-differ
23 def _CreateSwarmingTask(self, master_name, builder_name, build_number, 27 def _CreateSwarmingTask(self, master_name, builder_name, build_number,
24 step_name, test_name): 28 step_name, test_name):
25 # Create the appropriate kind of Swarming Task (Flake). 29 # Create the appropriate kind of Swarming Task (Flake).
26 swarming_task = FlakeSwarmingTask.Create( 30 swarming_task = FlakeSwarmingTask.Create(
27 master_name, builder_name, build_number, step_name, test_name) 31 master_name, builder_name, build_number, step_name, test_name)
28 return swarming_task 32 return swarming_task
29 33
30 def _GetIterationsToRerun(self): 34 def _GetIterationsToRerun(self):
31 # How many times we want to run the swarming rerun? 35 return waterfall_config.GetCheckFlakeSettings().get('iterations_to_rerun')
32 return 10
33 36
34 def _GetArgs(self, master_name, builder_name, build_number, step_name, tests): 37 def _GetArgs(self, master_name, builder_name, build_number, step_name, tests):
35 test_name = tests[0] #only one test per pipeline 38 test_name = tests[0] # Only one test per pipeline.
36 return (master_name, builder_name, build_number, step_name, test_name) 39 return (master_name, builder_name, build_number, step_name, test_name)
OLDNEW
« no previous file with comments | « appengine/findit/waterfall/trigger_base_swarming_task_pipeline.py ('k') | appengine/findit/waterfall/waterfall_config.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698