OLD | NEW |
---|---|
1 # coding=utf8 | 1 # coding=utf8 |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 """Sends patches to the Try server and reads back results. | 5 """Sends patches to the Try server and reads back results. |
6 | 6 |
7 - RietveldTryJobs contains RietveldTryJob, one per try job on a builder. | 7 - RietveldTryJobs contains RietveldTryJob, one per try job on a builder. |
8 - TryRunnerRietveld uses Rietveld to signal and poll job results. | 8 - TryRunnerRietveld uses Rietveld to signal and poll job results. |
9 """ | 9 """ |
10 | 10 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
49 """Represents a try job for a pending commit that we care about. | 49 """Represents a try job for a pending commit that we care about. |
50 | 50 |
51 This data can be regenerated by parsing all the try job names but it is a bit | 51 This data can be regenerated by parsing all the try job names but it is a bit |
52 hard on the try server. | 52 hard on the try server. |
53 """ | 53 """ |
54 builder = unicode | 54 builder = unicode |
55 build = int | 55 build = int |
56 revision = (None, unicode, int) | 56 revision = (None, unicode, int) |
57 requested_steps = list | 57 requested_steps = list |
58 # The timestamp when the build started. | 58 # The timestamp when the build started. |
59 started = float | 59 started = (float, int, None) |
Peter Mayo
2012/11/23 20:53:42
None (the default) goes first, No?
M-A Ruel
2012/11/23 20:55:33
I prefer 0. as the default as I want to get rid of
| |
60 steps_passed = list | 60 steps_passed = list |
61 steps_failed = list | 61 steps_failed = list |
62 clobber = bool | 62 clobber = bool |
63 completed = bool | 63 completed = bool |
64 # Number of retries for this configuration. Initial try is 1. | 64 # Number of retries for this configuration. Initial try is 1. |
65 tries = int | 65 tries = int |
66 parent_key = (None, unicode) | 66 parent_key = (None, unicode) |
67 init_time = float | 67 init_time = float |
68 | 68 |
69 def __init__(self, **kwargs): | 69 def __init__(self, **kwargs): |
(...skipping 29 matching lines...) Expand all Loading... | |
99 completed so another was sent with the missing tests. | 99 completed so another was sent with the missing tests. |
100 Also, a try job is sent as soon as a test failure is detected. | 100 Also, a try job is sent as soon as a test failure is detected. |
101 """ | 101 """ |
102 # An dict of RietveldTryJob objects per key. | 102 # An dict of RietveldTryJob objects per key. |
103 try_jobs = dict | 103 try_jobs = dict |
104 # The try job keys we ignore because they can't be used to give a good | 104 # The try job keys we ignore because they can't be used to give a good |
105 # signal: either they are too old (old revision) or they were not triggerd | 105 # signal: either they are too old (old revision) or they were not triggerd |
106 # by Rietveld, so we don't know if the diff is 100% good. | 106 # by Rietveld, so we don't know if the diff is 100% good. |
107 irrelevant = list | 107 irrelevant = list |
108 # When NOTRY=true is specified. | 108 # When NOTRY=true is specified. |
109 skipped = bool | 109 skipped = (bool, None) |
110 # Mapping from builders to list of tests. | 110 # Mapping from builders to list of tests. |
111 builders_and_tests = dict | 111 builders_and_tests = dict |
112 # Mapping from triggered builders to their parent. Do not change this | 112 # Mapping from triggered builders to their parent. Do not change this |
113 # directly. Instead use self.update_triggered_builders() | 113 # directly. Instead use self.update_triggered_builders() |
114 triggered_builders = dict | 114 triggered_builders = dict |
115 # Jobs that have been sent but are not found yet. Likely a builder is fully | 115 # Jobs that have been sent but are not found yet. Likely a builder is fully |
116 # utilized or the try server hasn't polled Rietveld yet. list of | 116 # utilized or the try server hasn't polled Rietveld yet. list of |
117 # RietveldTryJobPending() instances. | 117 # RietveldTryJobPending() instances. |
118 pendings = list | 118 pendings = list |
119 | 119 |
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
578 return match and match.group(1).lower() == 'true' | 578 return match and match.group(1).lower() == 'true' |
579 | 579 |
580 def _update_jobs_from_rietveld(self, pending, jobs): | 580 def _update_jobs_from_rietveld(self, pending, jobs): |
581 """Grabs data from Rietveld and pass it to | 581 """Grabs data from Rietveld and pass it to |
582 RietveldTryJobs.update_jobs_from_rietveld(). | 582 RietveldTryJobs.update_jobs_from_rietveld(). |
583 """ | 583 """ |
584 data = self.context.rietveld.get_patchset_properties( | 584 data = self.context.rietveld.get_patchset_properties( |
585 pending.issue, pending.patchset) | 585 pending.issue, pending.patchset) |
586 return jobs.update_jobs_from_rietveld( | 586 return jobs.update_jobs_from_rietveld( |
587 data, self.status, self.context.checkout) | 587 data, self.status, self.context.checkout) |
OLD | NEW |