OLD | NEW |
(Empty) | |
| 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 |
| 3 # found in the LICENSE file. |
| 4 |
| 5 from model.build_analysis import BuildAnalysis |
| 6 from model.build_analysis_status import BuildAnalysisStatus |
| 7 from waterfall import build_failure_analysis |
| 8 from waterfall.base_pipeline import BasePipeline |
| 9 |
| 10 |
| 11 class IdentifyCulpritPipeline(BasePipeline): |
| 12 """A pipeline to identify culprit CLs for a build failure.""" |
| 13 |
| 14 # Arguments number differs from overridden method - pylint: disable=W0221 |
| 15 def run(self, failure_info, change_logs, signals): |
| 16 """ |
| 17 Args: |
| 18 failure_info (dict): Output of pipeline DetectFirstFailurePipeline. |
| 19 change_logs (dict): Output of pipeline PullChangelogPipeline. |
| 20 signals (dict): Output of pipeline ExtractSignalPipeline. |
| 21 |
| 22 Returns: |
| 23 The same dict as the returned value of function |
| 24 build_failure_analysis.AnalyzeBuildFailure. |
| 25 """ |
| 26 master_name = failure_info['master_name'] |
| 27 builder_name = failure_info['builder_name'] |
| 28 build_number = failure_info['build_number'] |
| 29 |
| 30 analysis_result = build_failure_analysis.AnalyzeBuildFailure( |
| 31 failure_info, change_logs, signals) |
| 32 analysis = BuildAnalysis.GetBuildAnalysis( |
| 33 master_name, builder_name, build_number) |
| 34 analysis.result = analysis_result |
| 35 analysis.status = BuildAnalysisStatus.ANALYZED |
| 36 analysis.put() |
| 37 |
| 38 return analysis_result |
OLD | NEW |