| OLD | NEW |
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 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 build_util | 13 from waterfall import build_util |
| 15 | 14 |
| 16 | 15 |
| 17 def _TriggerNewAnalysesOnDemand(builds): | 16 def _TriggerNewAnalysesOnDemand(builds): |
| 18 for build in builds: | 17 for build in builds: |
| 19 master_name = build['master_name'] | 18 master_name = build['master_name'] |
| 20 builder_name = build['builder_name'] | 19 builder_name = build['builder_name'] |
| (...skipping 26 matching lines...) Expand all Loading... |
| 47 1. A new step failed. | 46 1. A new step failed. |
| 48 2. The build became completed after last analysis. This will potentially | 47 2. The build became completed after last analysis. This will potentially |
| 49 trigger a try-job run. | 48 trigger a try-job run. |
| 50 """ | 49 """ |
| 51 | 50 |
| 52 PERMISSION_LEVEL = Permission.ADMIN | 51 PERMISSION_LEVEL = Permission.ADMIN |
| 53 | 52 |
| 54 def HandlePost(self): | 53 def HandlePost(self): |
| 55 builds = json.loads(self.request.body).get('builds', []) | 54 builds = json.loads(self.request.body).get('builds', []) |
| 56 _TriggerNewAnalysesOnDemand(builds) | 55 _TriggerNewAnalysesOnDemand(builds) |
| OLD | NEW |