Chromium Code Reviews| Index: appengine/findit/handlers/flake/check_flaky.py |
| diff --git a/appengine/findit/handlers/flake/check_flaky.py b/appengine/findit/handlers/flake/check_flaky.py |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..f6c10420b38774cfaa67922b8643aebce809c8e7 |
| --- /dev/null |
| +++ b/appengine/findit/handlers/flake/check_flaky.py |
| @@ -0,0 +1,32 @@ |
| +# Copyright 2016 The Chromium Authors. All rights reserved. |
| +# Use of this source code is governed by a BSD-style license that can be |
| +# found in the LICENSE file. |
| + |
| +from common.base_handler import BaseHandler |
| +from common.base_handler import Permission |
| +from waterfall import swarming_util |
| + |
| +class CheckFlaky(BaseHandler): |
|
stgao
2016/06/08 17:24:12
style nit: one more line above.
caiw
2016/06/13 22:43:56
Acknowledged.
|
| + PERMISSION_LEVEL = Permission.CORP_USER |
| + |
| + def HandleGet(self): |
| + #get input parameters |
|
lijeffrey
2016/06/08 18:05:56
Style nit:
comments should be in the form
# Get
caiw
2016/06/13 22:43:55
Acknowledged.
|
| + master_name = self.request.get('master_name').strip() |
| + builder_name = self.request.get('builder_name').strip() |
| + build_number = self.request.get('build_number').strip() |
| + test_target_name = self.request.get('test_target_name').strip() |
| + testcase_list = self.request.get('testcase_list').strip() |
|
stgao
2016/06/08 17:24:12
To make it simpler, how about starting with a sing
caiw
2016/06/13 22:43:56
Acknowledged.
stgao
2016/06/13 22:56:11
It seems that this comment was not addressed in th
|
| + print(master_name, builder_name, build_number, |
|
lijeffrey
2016/06/08 18:05:56
This print looks like it's for debugging. Be sure
caiw
2016/06/13 22:43:55
Acknowledged.
caiw
2016/06/13 22:43:56
Acknowledged.
|
| + test_target_name, testcase_list) |
| + |
| + # get task id |
|
chanli
2016/06/08 20:46:00
Style nit like ln 13
caiw
2016/06/13 22:43:55
Acknowledged.
caiw
2016/06/13 22:43:55
Acknowledged.
|
| + tasks = swarming_util.ListSwarmingTasksDataByTags( |
|
stgao
2016/06/08 17:24:12
As we only need the task id for the specific test
stgao
2016/06/08 17:24:12
This will send one or more http request to the Swa
caiw
2016/06/13 22:43:55
Acknowledged.
caiw
2016/06/13 22:43:56
Acknowledged.
caiw
2016/06/13 22:43:56
Acknowledged.
caiw
2016/06/14 19:48:05
Acknowledged.
|
| + master_name=master_name, builder_name=builder_name, |
| + build_number=build_number,http_client='') |
| + print(tasks) |
| + # TODO: trigger swarming reruns |
|
lijeffrey
2016/06/08 18:05:57
Nit: for TODOs, if you plan to do them yourself, y
caiw
2016/06/13 22:43:56
Acknowledged.
|
| + # TODO: get the results from swarming reruns |
| + # TODO: this should return some kind of template |
| + |
| + def HandlePost(self): # pragma: no cover |
| + return self.HandleGet() |