Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 from datetime import datetime | 5 from datetime import datetime |
| 6 | 6 |
| 7 from common import appengine_util | 7 from common import appengine_util |
| 8 from common.pipeline_wrapper import BasePipeline | 8 from common.pipeline_wrapper import BasePipeline |
| 9 from common.pipeline_wrapper import pipeline | 9 from common.pipeline_wrapper import pipeline |
| 10 from model import analysis_status | 10 from model import analysis_status |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 63 analysis.put() | 63 analysis.put() |
| 64 | 64 |
| 65 # Arguments number differs from overridden method - pylint: disable=W0221 | 65 # Arguments number differs from overridden method - pylint: disable=W0221 |
| 66 def run(self, master_name, builder_name, build_number, build_completed, | 66 def run(self, master_name, builder_name, build_number, build_completed, |
| 67 force_rerun_try_job): | 67 force_rerun_try_job): |
| 68 self._ResetAnalysis(master_name, builder_name, build_number) | 68 self._ResetAnalysis(master_name, builder_name, build_number) |
| 69 | 69 |
| 70 # The yield statements below return PipelineFutures, which allow subsequent | 70 # The yield statements below return PipelineFutures, which allow subsequent |
| 71 # pipelines to refer to previous output values. | 71 # pipelines to refer to previous output values. |
| 72 # https://github.com/GoogleCloudPlatform/appengine-pipelines/wiki/Python | 72 # https://github.com/GoogleCloudPlatform/appengine-pipelines/wiki/Python |
| 73 | |
| 74 # Heuristic Approach | |
|
lijeffrey
2016/08/04 10:31:47
nit: . after comment
chanli
2016/08/05 19:53:53
Done.
| |
| 73 failure_info = yield DetectFirstFailurePipeline( | 75 failure_info = yield DetectFirstFailurePipeline( |
| 74 master_name, builder_name, build_number) | 76 master_name, builder_name, build_number) |
| 75 change_logs = yield PullChangelogPipeline(failure_info) | 77 change_logs = yield PullChangelogPipeline(failure_info) |
| 76 deps_info = yield ExtractDEPSInfoPipeline(failure_info, change_logs) | 78 deps_info = yield ExtractDEPSInfoPipeline(failure_info, change_logs) |
| 77 signals = yield ExtractSignalPipeline(failure_info) | 79 signals = yield ExtractSignalPipeline(failure_info) |
| 78 heuristic_result = yield IdentifyCulpritPipeline( | 80 heuristic_result = yield IdentifyCulpritPipeline( |
| 79 failure_info, change_logs, deps_info, signals, build_completed) | 81 failure_info, change_logs, deps_info, signals, build_completed) |
| 80 | 82 |
| 83 # Try job Approach | |
| 81 with pipeline.InOrder(): | 84 with pipeline.InOrder(): |
| 82 # Triggers swarming tasks when test failure happens. | 85 # Swarming rerun. |
| 86 # Triggers swarming tasks when first time test failure happens. | |
| 87 # This pipeline will run before build completes. | |
| 83 yield TriggerSwarmingTasksPipeline( | 88 yield TriggerSwarmingTasksPipeline( |
| 84 master_name, builder_name, build_number, failure_info) | 89 master_name, builder_name, build_number, failure_info) |
| 85 # Checks if need a try job and starts one if yes. | 90 # Checks if first time failures happen and starts a try job if yes. |
| 86 yield StartTryJobOnDemandPipeline( | 91 yield StartTryJobOnDemandPipeline( |
| 87 failure_info, signals, build_completed, force_rerun_try_job, | 92 master_name, builder_name, build_number, failure_info, |
| 88 heuristic_result) | 93 signals, heuristic_result, build_completed, force_rerun_try_job) |
| OLD | NEW |