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

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

Issue 2130543004: Waterfall components of regression range finder. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: refactored 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 from google.appengine.ext import ndb
2
3 import logging
4
5 from waterfall.trigger_base_swarming_task_pipeline import (
6 TriggerBaseSwarmingTaskPipeline as TBSTP)
7 from model.flake.flake_swarming_task import FlakeSwarmingTask
8
9 class TriggerFlakeSwarmingTaskPipeline(TBSTP):
10 """A pipeline to check if selected tests of a step are flaky.
11
12 This pipeline only supports test steps that run on Swarming and support the
13 gtest filter.
14 """
15 #pylint: disable=arguments-differ
16 def _GetSwarmingTask(self,master_name, builder_name, build_number,
17 step_name, test_name):
18 # Get the appropriate kind of Swarming Task (Flake).
19 swarming_task = FlakeSwarmingTask.Get(
20 master_name, builder_name, build_number, step_name, test_name)
21 return swarming_task
22
23 #pylint: disable=arguments-differ
24 def _CreateSwarmingTask(self, master_name, builder_name, build_number,
25 step_name, test_name):
26 # Create the appropriate kind of Swarming Task (Flake).
27 swarming_task = FlakeSwarmingTask.Create(
28 master_name, builder_name, build_number, step_name, test_name)
29 return swarming_task
30
31 def _GetIterationsToRerun(self):
32 # How many times we want to run the swarming rerun?
33 # TODO(caiw): Move to config.
34 return 10
35
36 def _GetArgs(self, master_name, builder_name, build_number, step_name, tests):
stgao 2016/07/14 18:34:50 One alternative is to return the key of the entity
caiw 2016/07/15 00:25:10 I thought we talked and said this was ok for now?
37 test_name = tests[0] #only one test per pipeline
38 logging.info("test name: %s" % test_name)
39 return (master_name, builder_name, build_number, step_name, test_name)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698