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 import json | 5 import json |
6 import logging | 6 import logging |
7 | 7 |
8 from common import constants | 8 from common import constants |
9 from common.base_handler import BaseHandler | 9 from common.base_handler import BaseHandler, Permission |
10 from common.base_handler import Permission | |
11 from common.http_client_appengine import HttpClientAppengine | 10 from common.http_client_appengine import HttpClientAppengine |
12 from waterfall import buildbot | 11 from waterfall import buildbot |
13 from waterfall import build_failure_analysis_pipelines | 12 from waterfall import build_failure_analysis_pipelines |
14 from waterfall import waterfall_config | 13 from waterfall import waterfall_config |
15 | 14 |
16 | 15 |
17 def _GetLatestBuildFailures(http_client): | 16 def _GetLatestBuildFailures(http_client): |
18 """Returns latest build failures from alerts in Sheriff-o-Matic. | 17 """Returns latest build failures from alerts in Sheriff-o-Matic. |
19 | 18 |
20 Returns: | 19 Returns: |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 def HandleGet(self): | 85 def HandleGet(self): |
87 build_failures = _GetLatestBuildFailures(self.HTTP_CLIENT) | 86 build_failures = _GetLatestBuildFailures(self.HTTP_CLIENT) |
88 for build_failure in build_failures: | 87 for build_failure in build_failures: |
89 build_failure_analysis_pipelines.ScheduleAnalysisIfNeeded( | 88 build_failure_analysis_pipelines.ScheduleAnalysisIfNeeded( |
90 build_failure['master_name'], | 89 build_failure['master_name'], |
91 build_failure['builder_name'], | 90 build_failure['builder_name'], |
92 build_failure['build_number'], | 91 build_failure['build_number'], |
93 failed_steps=build_failure['failed_steps'], | 92 failed_steps=build_failure['failed_steps'], |
94 force=False, | 93 force=False, |
95 queue_name=constants.WATERFALL_ANALYSIS_QUEUE) | 94 queue_name=constants.WATERFALL_ANALYSIS_QUEUE) |
OLD | NEW |