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

Unified 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: 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 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
new file mode 100644
index 0000000000000000000000000000000000000000..b8b348dc14735cfd3cd6060364f6378f5f86fc8c
--- /dev/null
+++ b/appengine/findit/waterfall/trigger_flake_swarming_task_pipeline.py
@@ -0,0 +1,32 @@
+from google.appengine.ext import ndb
+
+from waterfall.trigger_base_swarming_task_pipeline import (
+ TriggerBaseSwarmingTaskPipeline as TBSTP)
+from model.flake.flake_swarming_task import FlakeSwarmingTask
+
+class TriggerFlakeSwarmingTaskPipeline(TBSTP):
+ """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.
+ """
+
+ @ndb.transactional
stgao 2016/07/09 00:04:34 Why this is needed?
caiw 2016/07/14 00:59:45 Done.
+ def _GetSwarmingTask(self,master_name, builder_name, step_name, build_number):
+ # Get the appropriate kind of Swarming Task (Flake).
+ swarming_task = FlakeSwarmingTask.Get(
+ master_name, builder_name, step_name, build_number)
+ return swarming_task
+
+ @ndb.transactional
stgao 2016/07/09 00:04:34 Why this is needed too?
caiw 2016/07/14 00:59:45 Done.
+ def _CreateSwarmingTask(self, master_name, builder_name,
+ step_name, build_number):
+ # Create the appropriate kind of Swarming Task (Flake).
+ swarming_task = FlakeSwarmingTask.Create(
+ master_name, builder_name, step_name, build_number)
+ return swarming_task
+
+ def _GetIterationsToRerun(self):
+ # How many times we want to run the swarming rerun.
+ # Placeholder:
+ return 10
stgao 2016/07/09 00:04:34 How about adding a TODO here to move this into the
caiw 2016/07/14 00:59:45 Done.

Powered by Google App Engine
This is Rietveld 408576698