Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

debounce new buildrequests events #6286

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Conversation

tardyp
Copy link
Member

@tardyp tardyp commented Oct 31, 2021

Fix #6285

new buildrequests arrive one by one in a burst. Problem is that the brd is triggered right at the first event, so all the fancy prioritization API we have are useless in this case.

This PR

  • improve the debouncer so that we can only call target function when the burst is finished
  • makes sure we send the events as fast as possible (in the buildset case)
  • optimize a bit the getBuilderById by precomputing the dictionary at reconfig

The drawback of this technic is that the tests need to manage the time and to make sure to advance the time when they send a buildrequest

until_idle resets the timer when there is a new call, so that the method
is only called once per burst
@tardyp tardyp force-pushed the sleep branch 2 times, most recently from df2506c to eac7749 Compare October 31, 2021 21:00
The brd has an api that can schedule several builders for requests,
but we don't use it unless at startup.

This change uses the debouncer so that we wait until there is no
new buildrequest event for 1 s before starting them all
@codecov
Copy link

codecov bot commented Nov 1, 2021

Codecov Report

Merging #6286 (4e0f8ad) into master (aae8fc9) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6286      +/-   ##
==========================================
- Coverage   92.02%   92.00%   -0.02%     
==========================================
  Files         335      335              
  Lines       37627    37646      +19     
==========================================
+ Hits        34625    34637      +12     
- Misses       3002     3009       +7     
Impacted Files Coverage Δ
master/buildbot/data/buildrequests.py 98.00% <100.00%> (+0.04%) ⬆️
master/buildbot/process/botmaster.py 98.32% <100.00%> (+0.10%) ⬆️
master/buildbot/util/debounce.py 100.00% <100.00%> (ø)
master/buildbot/worker/latent.py 94.65% <0.00%> (-2.06%) ⬇️
master/buildbot/process/build.py 94.70% <0.00%> (-0.45%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update aae8fc9...4e0f8ad. Read the comment docs.

@tardyp tardyp changed the title [DONT MERGE] add asyncSleep to make sure we gather maybeStartBuild events debounce new buildrequests events Nov 1, 2021
@p12tic
Copy link
Member

p12tic commented Nov 3, 2021

Needs rebase to get rid of commit already merged via #6287.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

prioritizeBuilders not functioning well
2 participants