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 | 6 |
7 from common import constants | 7 from common import constants |
8 from common.base_handler import BaseHandler | 8 from common.base_handler import BaseHandler, Permission |
9 from common.base_handler import Permission | |
10 from common.http_client_appengine import HttpClientAppengine | 9 from common.http_client_appengine import HttpClientAppengine |
11 from waterfall import buildbot | 10 from waterfall import buildbot |
12 from waterfall import build_failure_analysis_pipelines | 11 from waterfall import build_failure_analysis_pipelines |
13 from waterfall import build_util | 12 from waterfall import build_util |
14 | 13 |
15 | 14 |
16 def _TriggerNewAnalysesOnDemand(builds): | 15 def _TriggerNewAnalysesOnDemand(builds): |
17 for build in builds: | 16 for build in builds: |
18 master_name = build['master_name'] | 17 master_name = build['master_name'] |
19 builder_name = build['builder_name'] | 18 builder_name = build['builder_name'] |
(...skipping 24 matching lines...) Expand all Loading... |
44 1. A new step failed. | 43 1. A new step failed. |
45 2. The build became completed after last analysis. This will potentially | 44 2. The build became completed after last analysis. This will potentially |
46 trigger a try-job run. | 45 trigger a try-job run. |
47 """ | 46 """ |
48 | 47 |
49 PERMISSION_LEVEL = Permission.ADMIN | 48 PERMISSION_LEVEL = Permission.ADMIN |
50 | 49 |
51 def HandlePost(self): | 50 def HandlePost(self): |
52 builds = json.loads(self.request.body).get('builds', []) | 51 builds = json.loads(self.request.body).get('builds', []) |
53 _TriggerNewAnalysesOnDemand(builds) | 52 _TriggerNewAnalysesOnDemand(builds) |
OLD | NEW |