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

Unified 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, 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 side-by-side diff with in-line comments
Download patch
Index: appengine/findit/waterfall/trigger_flake_swarming_task_pipeline.py
diff --git a/appengine/findit/waterfall/trigger_flake_swarming_task_pipeline.py b/appengine/findit/waterfall/trigger_flake_swarming_task_pipeline.py
index d9a2b3dc668ee4b174185168117b1941aeaa1122..e6abcba7979df74f570c0a2c410d3576de6085db 100644
--- a/appengine/findit/waterfall/trigger_flake_swarming_task_pipeline.py
+++ b/appengine/findit/waterfall/trigger_flake_swarming_task_pipeline.py
@@ -1,25 +1,29 @@
-from google.appengine.ext import ndb
-
-import logging
+# Copyright 2016 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+from model.flake.flake_swarming_task import FlakeSwarmingTask
+from waterfall import waterfall_config
from waterfall.trigger_base_swarming_task_pipeline import(
TriggerBaseSwarmingTaskPipeline)
-from model.flake.flake_swarming_task import FlakeSwarmingTask
+
+
class TriggerFlakeSwarmingTaskPipeline(TriggerBaseSwarmingTaskPipeline):
"""A pipeline to check if selected tests of a step are flaky.
This pipeline only supports test steps that run on Swarming and support the
gtest filter.
"""
- #pylint: disable=arguments-differ
- def _GetSwarmingTask(self,master_name, builder_name, build_number,
+
+ # pylint: disable=arguments-differ
+ def _GetSwarmingTask(self, master_name, builder_name, build_number,
step_name, test_name):
# Get the appropriate kind of Swarming Task (Flake).
swarming_task = FlakeSwarmingTask.Get(
master_name, builder_name, build_number, step_name, test_name)
return swarming_task
- #pylint: disable=arguments-differ
+ # pylint: disable=arguments-differ
def _CreateSwarmingTask(self, master_name, builder_name, build_number,
step_name, test_name):
# Create the appropriate kind of Swarming Task (Flake).
@@ -28,9 +32,8 @@ class TriggerFlakeSwarmingTaskPipeline(TriggerBaseSwarmingTaskPipeline):
return swarming_task
def _GetIterationsToRerun(self):
- # How many times we want to run the swarming rerun?
- return 10
+ return waterfall_config.GetCheckFlakeSettings().get('iterations_to_rerun')
def _GetArgs(self, master_name, builder_name, build_number, step_name, tests):
- test_name = tests[0] #only one test per pipeline
+ test_name = tests[0] # Only one test per pipeline.
return (master_name, builder_name, build_number, step_name, test_name)
« 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