Skip to content

Commit

Permalink
Address feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
diegorusso committed Oct 25, 2024
1 parent 5c4e84b commit 29b8998
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 31 deletions.
3 changes: 2 additions & 1 deletion master/custom/builders.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@
("aarch64 RHEL8 LTO", "cstratak-RHEL8-aarch64", LTONonDebugUnixBuild),
("aarch64 RHEL8 LTO + PGO", "cstratak-RHEL8-aarch64", LTOPGONonDebugBuild),

("aarch64 Ubuntu 22.04 BigMem", "diegorusso-aarch64-bigmem", UnixBigmemBuild),

# macOS aarch64 clang
("ARM64 macOS", "pablogsal-macos-m1", MacOSArmWithBrewBuild),
Expand Down Expand Up @@ -243,6 +242,8 @@
("PPC64LE CentOS9 LTO + PGO", "cstratak-CentOS9-ppc64le", LTOPGONonDebugBuild),

# Linux aarch64 GCC/Clang
("aarch64 Ubuntu 22.04 BigMem", "diegorusso-aarch64-bigmem", UnixBigmemBuild),

# Fedora Rawhide is unstable
("aarch64 Fedora Rawhide", "cstratak-fedora-rawhide-aarch64", FedoraRawhideBuild),
("aarch64 Fedora Rawhide Refleaks", "cstratak-fedora-rawhide-aarch64", UnixRefleakBuild),
Expand Down
2 changes: 1 addition & 1 deletion master/custom/factories.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ class UnixBuildWithoutDocStrings(UnixBuild):
class UnixBigmemBuild(UnixBuild):
buildersuffix = ".bigmem"
testFlags = ["-M60g", "-j4", "-uall,extralargefile"]
factory_tags = ["aarch64", "bigmem"]
factory_tags = ["bigmem"]


class AIXBuild(UnixBuild):
Expand Down
65 changes: 36 additions & 29 deletions master/master.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import os
import subprocess
import sys

from datetime import timedelta, datetime
from datetime import datetime, timedelta
from functools import partial

from buildbot.plugins import reporters, schedulers, util
Expand Down Expand Up @@ -182,6 +182,24 @@ def is_important_change(change):
return any(is_important_file(filename) for filename in change.files)


# Avoid a build to be started between start and end time and delay such build
# at end time
def no_builds_between(start, end):
def f(builder, requests):
now = datetime.now()
if start <= now.hour < end:
# Calculate the delay until end time
delay = ((end - now.hour) % 24) * 3600 - now.minute * 60 - now.second
builder.master.reactor.callLater(
delay,
builder.buildset_manager.submitBuildSet,
requests[0],
)
return None # Do not start the build immediately
return requests[0] # Start the next build request
return f


github_status_builders = []
release_status_builders = []
mail_status_builders = []
Expand Down Expand Up @@ -247,17 +265,24 @@ for branch_num, (git_url, branchname, git_branch) in enumerate(git_branches):
mail_status_builders.append(buildername)
github_status_builders.append(buildername)
release_status_builders.append(buildername)
c["builders"].append(
util.BuilderConfig(
name=buildername,
workernames=[worker_name],
builddir="%s.%s%s"
% (branchname, worker_name, getattr(f, "buildersuffix", "")),
factory=f,
tags=tags,
locks=[cpulock.access("counting")],
)

builder = util.BuilderConfig(
name=buildername,
workernames=[worker_name],
builddir="%s.%s%s"
% (branchname, worker_name, getattr(f, "buildersuffix", "")),
factory=f,
tags=tags,
locks=[cpulock.access("counting")],
)

# This worker runs pyperformance at 12am. If a build is scheduled between
# 10pm and 2am, it will be delayed at 2am.
if worker_name == "diegorusso-aarch64-bigmem":
builder.nextBuild = no_builds_between(22, 2)

c["builders"].append(builder)

c["schedulers"].append(
schedulers.SingleBranchScheduler(
name=branchname,
Expand Down Expand Up @@ -288,24 +313,6 @@ for branch_num, (git_url, branchname, git_branch) in enumerate(git_branches):
stable_pull_request_builders = []
all_pull_request_builders = []

# Avoid a build to be started between start and end time and delay such build
# at end time
def no_builds_between(start, end):
def f(builder, requests):
now = datetime.now()
if start <= now.hour < end:
# Calculate the delay until end time
delay = ((end - now.hour) % 24) * 3600 - now.minute * 60 - now.second
builder.master.reactor.callLater(
delay,
builder.buildset_manager.submitBuildSet,
requests[0]
)
return None # Do not start the build immediately
return requests[0] # Start the next build request
return f


for name, worker_name, buildfactory, stability, tier in BUILDERS:
if "Windows XP" in name or "VS9.0" in name:
continue
Expand Down

0 comments on commit 29b8998

Please sign in to comment.