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

Unified Diff: appengine/findit/waterfall/flake/initialize_flake_pipeline.py

Issue 2345093002: [Findit] Extending versioned_model.py to support versioning multiple entities of the same class. (Closed)
Patch Set: Ignore this patch, uploaded unrelated change to wrong branch 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 side-by-side diff with in-line comments
Download patch
Index: appengine/findit/waterfall/flake/initialize_flake_pipeline.py
diff --git a/appengine/findit/waterfall/flake/initialize_flake_pipeline.py b/appengine/findit/waterfall/flake/initialize_flake_pipeline.py
index 3c5d4351d8f56d4a82f394fe4e574a1e1949ebdb..08984d382847f4c83a59b895ae5086ddbdd5fa93 100644
--- a/appengine/findit/waterfall/flake/initialize_flake_pipeline.py
+++ b/appengine/findit/waterfall/flake/initialize_flake_pipeline.py
@@ -6,6 +6,7 @@ from google.appengine.ext import ndb
from common import appengine_util
from common import constants
+from common import time_util
from model import analysis_status
from model.flake.master_flake_analysis import MasterFlakeAnalysis
from waterfall import waterfall_config
@@ -33,6 +34,7 @@ def NeedANewAnalysis(
return False
master_flake_analysis = MasterFlakeAnalysis.Create(
master_name, builder_name, build_number, step_name, test_name)
+ master_flake_analysis.created_time = time_util.GetUTCNow()
master_flake_analysis.status = analysis_status.PENDING
master_flake_analysis.put()
return True
@@ -78,7 +80,16 @@ def ScheduleAnalysisIfNeeded(master_name, builder_name, build_number, step_name,
if NeedANewAnalysis(
master_name, builder_name, build_number, step_name, test_name,
allow_new_analysis):
+ master_flake_analysis = MasterFlakeAnalysis.Get(
+ master_name, builder_name, build_number, step_name, test_name)
check_flake_settings = waterfall_config.GetCheckFlakeSettings()
+
+ # TODO(lijeffrey): Allow for reruns with custom parameters if the user is
+ # not satisfied with with the results generated by the default ones provided
+ # by waterfall_config and record the custom ones here.
+ master_flake_analysis.algorithm_parameters = check_flake_settings
+ master_flake_analysis.put()
+
max_build_numbers_to_look_back = check_flake_settings.get(
'max_build_numbers_to_look_back')
flakiness_algorithm_results_dict = {
@@ -93,6 +104,7 @@ def ScheduleAnalysisIfNeeded(master_name, builder_name, build_number, step_name,
'lower_boundary_result': None,
'sequential_run_index': 0
}
+
pipeline_job = RecursiveFlakePipeline(
master_name, builder_name, build_number, step_name, test_name,
master_build_number=build_number,
@@ -101,4 +113,4 @@ def ScheduleAnalysisIfNeeded(master_name, builder_name, build_number, step_name,
constants.WATERFALL_BACKEND)
pipeline_job.start(queue_name=queue_name)
return MasterFlakeAnalysis.Get(
- master_name, builder_name, build_number, step_name, test_name)
+ master_name, builder_name, build_number, step_name, test_name)
« no previous file with comments | « appengine/findit/templates/flake/result.html ('k') | appengine/findit/waterfall/flake/recursive_flake_pipeline.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698