-
-
Notifications
You must be signed in to change notification settings - Fork 57
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
Add diegorusso-aarch64-bigmem worker #546
Conversation
Folks, I'm not an expert on buildbot. With this worker we want to avoid builds between 10pm and 2am because at midnight we run pyperformance to push data to speed.python.org. |
Also this worker has:
|
master/custom/builders.py
Outdated
@@ -125,6 +126,8 @@ | |||
("aarch64 RHEL8 LTO", "cstratak-RHEL8-aarch64", LTONonDebugUnixBuild), | |||
("aarch64 RHEL8 LTO + PGO", "cstratak-RHEL8-aarch64", LTOPGONonDebugBuild), | |||
|
|||
("aarch64 Ubuntu 22.04 BigMem", "diegorusso-aarch64-bigmem", UnixBigmemBuild), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to start in the unstable set, around line 245. Once we've proven that things work as expected, we can move back here to the stable set.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved, thanks!
master/custom/factories.py
Outdated
class UnixBigmemBuild(UnixBuild): | ||
buildersuffix = ".bigmem" | ||
testFlags = ["-M60g", "-j4", "-uall,extralargefile"] | ||
factory_tags = ["aarch64", "bigmem"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The aarch64
tag doesn't really belong here; there's nothing specific to aarch64
in this builder factory (it would work perfectly well with a similarly beefy x86_64 machine). We do need to fix how tags are assigned to include tags from the worker as well, though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, removed.
This worker avoids builds to be started between 10pm and 2am. They will be scheduled at 2am.
8c33f7f
to
5c4e84b
Compare
29b8998
to
8b9ee92
Compare
Please note, GitHub's review interface is useless with force-pushes. This repository does squash merges just like |
master/custom/workers.py
Outdated
name="diegorusso-aarch64-bigmem", | ||
tags=['linux', 'unix', 'ubuntu', 'arm', 'arm64', 'aarch64', 'bigmem'], | ||
not_branches=['3.9', '3.10', '3.11', '3.12', '3.13'], | ||
parallel_tests=60, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just noticing this value, it seems a little extreme for a bigmem builder. Theoretically, this could call on 3600GB of RAM (60 tests x 60GB each from the -M60g
option). In practice there aren't enough bigmem tests to actually request that, but this is a big enough number of tests that it becomes likely that multiple (possibly all) bigmem tests will be running in parallel.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, my bad. Decreased to 4, so we should be good (60*4=240)
master/master.cfg
Outdated
def no_builds_between(start, end): | ||
def f(builder, requests): | ||
now = datetime.now() | ||
if start <= now.hour < end: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This condition will never be true with start=22
and end=2
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right. I wrote the prototype but then left as is. I'll fix it tomorrow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hopefully now the code is better to read and understand. Now it works when the time range spans over midnight.
I know, the force push were to fix a rebase I did on top of main. I really don't like the merge commit that Github does when "updating" the branch when outdated. IIRC the other force push was to fix a typo in the commit message. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
One question, though: is there any way to do the scheduling trickery at the worker level rather than the builder level? I feel like that might be a cleaner long term solution, but as I'm not sure it's possible I'm not going to push for it :). If we do determine later that it's doable (or we have issues with what's here) we can always change it later.
Thanks for merging the PR. The worker is now online! https://buildbot.python.org/#/workers/114 Regarding your comment, I agree with you we should do this at the worker level but I'm no expert in buildbot and this is a way I found to do it. If anyone out there could point me to the right direction, I'll be more than happy to do it. |
# Schedule the build later | ||
builder.master.reactor.callLater( | ||
int(delay), | ||
builder.buildset_manager.submitBuildSet, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're getting an exception here:
Traceback (most recent call last):
File "/srv/buildbot/venv/lib/python3.9/site-packages/twisted/internet/defer.py", line 980, in _startRunCallbacks
self._runCallbacks()
File "/srv/buildbot/venv/lib/python3.9/site-packages/twisted/internet/defer.py", line 1074, in _runCallbacks
current.result = callback( # type: ignore[misc]
File "/srv/buildbot/venv/lib/python3.9/site-packages/twisted/internet/defer.py", line 1960, in _gotResultInlineCallbacks
_inlineCallbacks(r, gen, status, context)
File "/srv/buildbot/venv/lib/python3.9/site-packages/twisted/internet/defer.py", line 2014, in _inlineCallbacks
result = context.run(gen.send, result)
--- <exception caught here> ---
File "/srv/buildbot/venv/lib/python3.9/site-packages/buildbot/process/buildrequestdistributor.py", line 262, in _getNextUnclaimedBuildRequest
nextBreq = yield self.nextBuild(self.bldr, breqs)
File "/srv/buildbot/master/master.cfg", line 216, in f
builder.buildset_manager.submitBuildSet,
builtins.AttributeError: 'Builder' object has no attribute 'buildset_manager'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I'm reading the nextBuild and Twisted docs correctly, this should return a Deferred like this:
from twisted.internet import defer
...
deferred = defer.Deferred()
builder.master.reactor.callLater(
int(delay),
deferred.callback,
requests[0],
)
return deferred
But, it would be nice to get confirmation from someone who's used Twisted before :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I filed #553
This worker avoids builds to be started between 10pm and 2am. They will be scheduled at 2am.
This addresses issue #473