|
|
Chromium Code Reviews|
Created:
4 years, 2 months ago by Michael Achenbach Modified:
4 years, 2 months ago CC:
chromium-reviews, infra-reviews+build_chromium.org, Sergey Berezin, emso Target Ref:
refs/heads/master Project:
build Visibility:
Public. |
DescriptionEnable merging buildbot builds dependent on queue length
This enhances custom mergeRequests functions with additional
parameters for the number of unclaimed builds in the queue
and the number of already merged builds.
This allows writing more flexible merge strategies, e.g.:
- Avoid huge blame lists during peak hours that stem from
the standard merge-all strategy.
- Avoid huge backlog on bots using the merge-none strategy.
This also adds an example FYI bot from V8 to test the new
feature.
BUG=654749
TEST=Tested on a local master stressed with fake commits.
Committed: https://chromium.googlesource.com/chromium/tools/build/+/34603b7a540ae40089ddce69aecedf2f6783c7ae
Patch Set 1 #Patch Set 2 : Enable merging buildbot builds dependent on queue length #Patch Set 3 : Enable merging buildbot builds dependent on queue length #
Total comments: 1
Patch Set 4 : Pass also number of merged builds #
Total comments: 4
Patch Set 5 : Review #
Total comments: 2
Patch Set 6 : Review #
Messages
Total messages: 26 (12 generated)
Description was changed from ========== Enable merging buildbot builds dependent on queue length BUG= ========== to ========== Enable merging buildbot builds dependent on queue length BUG=654749 ==========
machenbach@chromium.org changed reviewers: + tandrii@chromium.org
PTAL (preliminary) - will add more reviewers if you don't find it too crazy/hacky/risky.
https://codereview.chromium.org/2415703004/diff/40001/third_party/buildbot_8_... File third_party/buildbot_8_4p1/buildbot/process/builder.py (right): https://codereview.chromium.org/2415703004/diff/40001/third_party/buildbot_8_... third_party/buildbot_8_4p1/buildbot/process/builder.py:878: merged_request_objects.append(other_breq_object) Thinking more: Now that I'm already changing this code, I could also pass len(merged_request_objects) to the merge function, so that I could remove the extra storage hack in there.
PTAL at patch 4
Description was changed from ========== Enable merging buildbot builds dependent on queue length BUG=654749 ========== to ========== Enable merging buildbot builds dependent on queue length This enhances custom mergeRequests functions with additional parameters for the number of unclaimed builds in the queue and the number of already merged builds. This allows writing more flexible merge strategies, e.g.: - Avoid huge blame lists during peak hours that stem from the standard merge-all strategy. - Avoid huge backlog on bots using the merge-none strategy. This also adds an example FYI bot from V8 to test the new feature. BUG=654749 ==========
lgtm https://codereview.chromium.org/2415703004/diff/60001/third_party/buildbot_8_... File third_party/buildbot_8_4p1/buildbot/process/builder.py (right): https://codereview.chromium.org/2415703004/diff/60001/third_party/buildbot_8_... third_party/buildbot_8_4p1/buildbot/process/builder.py:856: # Make sure the merge-requests function can take the queue length. Old ...queue length and len(merged_requests). https://codereview.chromium.org/2415703004/diff/60001/third_party/buildbot_8_... third_party/buildbot_8_4p1/buildbot/process/builder.py:858: mergeRequests_with_length_fn = lambda a, b, *_ : mergeRequests_fn(a, b) inspect on bound class functions or on functions with kwargs or *args will not quite work in all cases as intended. I'd do the usual python way: try and see what happens. def wrapper(a,b,c,d): try: return mergeRequests_fn(a,b) except TypeError: return mergeRequests_fn(a,b,c,d)
On 2016/10/13 13:35:22, tandrii(chromium) wrote: > lgtm i didn't mean to click lg-tm button.
PTAL at patch 5 https://codereview.chromium.org/2415703004/diff/60001/third_party/buildbot_8_... File third_party/buildbot_8_4p1/buildbot/process/builder.py (right): https://codereview.chromium.org/2415703004/diff/60001/third_party/buildbot_8_... third_party/buildbot_8_4p1/buildbot/process/builder.py:856: # Make sure the merge-requests function can take the queue length. Old On 2016/10/13 13:35:22, tandrii(chromium) wrote: > ...queue length and len(merged_requests). wrote "lengths" now https://codereview.chromium.org/2415703004/diff/60001/third_party/buildbot_8_... third_party/buildbot_8_4p1/buildbot/process/builder.py:858: mergeRequests_with_length_fn = lambda a, b, *_ : mergeRequests_fn(a, b) On 2016/10/13 13:35:22, tandrii(chromium) wrote: > inspect on bound class functions or on functions with kwargs or *args will not > quite work in all cases as intended. I'd do the usual python way: try and see > what happens. > def wrapper(a,b,c,d): > try: > return mergeRequests_fn(a,b) > except TypeError: > return mergeRequests_fn(a,b,c,d) Good catch. Now implemented your suggestion to use an extra attribute and got rid of inspect.
Description was changed from ========== Enable merging buildbot builds dependent on queue length This enhances custom mergeRequests functions with additional parameters for the number of unclaimed builds in the queue and the number of already merged builds. This allows writing more flexible merge strategies, e.g.: - Avoid huge blame lists during peak hours that stem from the standard merge-all strategy. - Avoid huge backlog on bots using the merge-none strategy. This also adds an example FYI bot from V8 to test the new feature. BUG=654749 ========== to ========== Enable merging buildbot builds dependent on queue length This enhances custom mergeRequests functions with additional parameters for the number of unclaimed builds in the queue and the number of already merged builds. This allows writing more flexible merge strategies, e.g.: - Avoid huge blame lists during peak hours that stem from the standard merge-all strategy. - Avoid huge backlog on bots using the merge-none strategy. This also adds an example FYI bot from V8 to test the new feature. BUG=654749 TEST=Tested on a local master stressed with fake commits. ==========
LGTM
machenbach@chromium.org changed reviewers: + agable@chromium.org, maruel@chromium.org, stip@chromium.org
+ a few buildbot experts PTAL
One comment. Also, make sure that you include this diff in the third_party/buildbot_8_4p1/README.chromium. https://codereview.chromium.org/2415703004/diff/80001/third_party/buildbot_8_... File third_party/buildbot_8_4p1/buildbot/process/builder.py (right): https://codereview.chromium.org/2415703004/diff/80001/third_party/buildbot_8_... third_party/buildbot_8_4p1/buildbot/process/builder.py:874: mergeRequests_with_length_fn( It might be less confusing if the "if fn.with_length" logic were down here, and then whether you pass two or four arguments is dependent on the result of that check, rather than always passing four and having to decode the lambda above. Up to you, though.
PTAL at patch 6. Didn't test it locally yet, but will do before landing anything. On 2016/10/13 17:58:37, agable wrote: > One comment. Also, make sure that you include this diff in the > third_party/buildbot_8_4p1/README.chromium. Looks like that file was made more generic by https://codereview.chromium.org/1383143003 . Guess there's nothing to do then? https://codereview.chromium.org/2415703004/diff/80001/third_party/buildbot_8_... File third_party/buildbot_8_4p1/buildbot/process/builder.py (right): https://codereview.chromium.org/2415703004/diff/80001/third_party/buildbot_8_... third_party/buildbot_8_4p1/buildbot/process/builder.py:874: mergeRequests_with_length_fn( On 2016/10/13 17:58:36, agable wrote: > It might be less confusing if the "if fn.with_length" logic were down here, and > then whether you pass two or four arguments is dependent on the result of that > check, rather than always passing four and having to decode the lambda above. Up > to you, though. Done.
Good catch on the README; lgtm.
The CQ bit was checked by machenbach@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
CC current trooper. Tested locally again and looks good. Landing this now.
The CQ bit was checked by machenbach@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from tandrii@chromium.org Link to the patchset: https://codereview.chromium.org/2415703004/#ps100001 (title: "Review")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Description was changed from ========== Enable merging buildbot builds dependent on queue length This enhances custom mergeRequests functions with additional parameters for the number of unclaimed builds in the queue and the number of already merged builds. This allows writing more flexible merge strategies, e.g.: - Avoid huge blame lists during peak hours that stem from the standard merge-all strategy. - Avoid huge backlog on bots using the merge-none strategy. This also adds an example FYI bot from V8 to test the new feature. BUG=654749 TEST=Tested on a local master stressed with fake commits. ========== to ========== Enable merging buildbot builds dependent on queue length This enhances custom mergeRequests functions with additional parameters for the number of unclaimed builds in the queue and the number of already merged builds. This allows writing more flexible merge strategies, e.g.: - Avoid huge blame lists during peak hours that stem from the standard merge-all strategy. - Avoid huge backlog on bots using the merge-none strategy. This also adds an example FYI bot from V8 to test the new feature. BUG=654749 TEST=Tested on a local master stressed with fake commits. Committed: https://chromium.googlesource.com/chromium/tools/build/+/34603b7a540ae40089dd... ==========
Message was sent while issue was closed.
Committed patchset #6 (id:100001) as https://chromium.googlesource.com/chromium/tools/build/+/34603b7a540ae40089dd... |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
