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

Collapse clean and non clean build requests on clean builders #266

Merged
merged 6 commits into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion zorg/buildbot/builders/ClangBuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,8 @@ def _getClangCMakeBuildFactory(
f = LLVMBuildFactory(
depends_on_projects=depends_on_projects,
llvm_srcdir='llvm',
enable_runtimes=enable_runtimes)
enable_runtimes=enable_runtimes,
clean=clean)

# Checkout the latest code for LNT
# and the test-suite separately. Le's do this first,
Expand Down
22 changes: 14 additions & 8 deletions zorg/buildbot/process/buildrequest.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,20 @@ def collapseRequests(master, builder, req1, req2):
('buildsets', str(req2['buildsetid'])))

# Fetch the buildset properties.
selfBuildsetPoperties = yield \
master.db.buildsets.getBuildsetProperties(
str(req1['buildsetid'])
)
otherBuildsetPoperties = yield \
master.db.buildsets.getBuildsetProperties(
str(req2['buildsetid'])
)
selfBuildsetPoperties = yield master.db.buildsets.getBuildsetProperties(
DavidSpickett marked this conversation as resolved.
Show resolved Hide resolved
str(req1["buildsetid"])
)
otherBuildsetPoperties = yield master.db.buildsets.getBuildsetProperties(
DavidSpickett marked this conversation as resolved.
Show resolved Hide resolved
str(req2["buildsetid"])
)

# If the build is going to be a clean build anyway, we can collapse a clean
# build and a non-clean build.
if getattr(builder.config.factory, "clean", False):
if 'clean_obj' in selfBuildsetPoperties:
del selfBuildsetPoperties["clean_obj"]
if 'clean_obj' in otherBuildsetPoperties:
del otherBuildsetPoperties["clean_obj"]
DavidSpickett marked this conversation as resolved.
Show resolved Hide resolved

# Check buildsets properties and do not collapse
# if properties do not match. This includes the check
Expand Down
2 changes: 2 additions & 0 deletions zorg/buildbot/process/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ def __init__(self, steps=None, depends_on_projects=None, hint=None, **kwargs):
BuildFactory.__init__(self, steps)

self.hint = hint

self.clean = kwargs.pop('clean', False)

# Handle the dependencies.
if depends_on_projects is None:
Expand Down