[PATCH] D69159: Separate automatic schedulers for builders depending on is_legacy_mode.
Andrei Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 17 22:44:51 PDT 2019
andreil99 created this revision.
andreil99 added reviewers: gkistanova, vvereschaka, aorlov.
andreil99 added projects: LLVM, Zorg.
Herald added subscribers: llvm-commits, javed.absar.
Changes from SVN should be scheduled for builders which checkout from SVN, changes from github should be scheduled for builders which checkout from github. For a transition period we need the both types of schedulers.
Repository:
rL LLVM
https://reviews.llvm.org/D69159
Files:
buildbot/osuosl/master/config/schedulers.py
Index: buildbot/osuosl/master/config/schedulers.py
===================================================================
--- buildbot/osuosl/master/config/schedulers.py
+++ buildbot/osuosl/master/config/schedulers.py
@@ -23,17 +23,40 @@
}
builders_with_automatic_schedulers = []
+ legacy_builders_with_automatic_schedulers = []
for builder in builders:
# Only for the builders created with LLVMBuildFactory or similar.
if getattr(builder['factory'], 'depends_on_projects', None):
- # And only if this builder is in the legacy mode and
- # does not yet have an assigned scheduler.
- if getattr(builder['factory'], 'is_legacy_mode', True) and \
- builder['name'] not in builders_with_schedulers:
- # This builder is a candidate for an automatic scheduler.
+ if getattr(builder['factory'], 'is_legacy_mode', True):
+ # Only if this builder is in the legacy mode and
+ # does not yet have an assigned scheduler.
+ if builder['name'] not in builders_with_schedulers:
+ legacy_builders_with_automatic_schedulers.append(builder)
+ else:
+ # There are no manually assigned schedulers in this case.
builders_with_automatic_schedulers.append(builder)
automatic_schedulers = []
+ automatic_schedulers.extend(
+ _getSingleBranchAutomaticSchedulers(
+ builders_with_automatic_schedulers,
+ filter_branch='master', # git monorepo branch.
+ treeStableTimer=kwargs.get('treeStableTimer', 2*60)))
+ automatic_schedulers.extend(
+ _getSingleBranchAutomaticSchedulers(
+ legacy_builders_with_automatic_schedulers,
+ filter_branch='trunk', # svn repo branch.
+ treeStableTimer=kwargs.get('treeStableTimer', 2*60)))
+
+ return automatic_schedulers
+
+def _getSingleBranchAutomaticSchedulers(
+ builders_with_automatic_schedulers,
+ filter_branch,
+ treeStableTimer):
+
+ automatic_schedulers = []
+
# Do we have any to take care of?
if builders_with_automatic_schedulers:
# Let's reconsile first to get a unique set of dependencies.
@@ -43,8 +66,6 @@
for b in builders_with_automatic_schedulers
])
- treeStableTimer = kwargs.get('treeStableTimer', 2*60)
- automatic_schedulers = []
for projects in set_of_dependencies:
sch_builders = [
b['name']
@@ -52,7 +73,7 @@
if frozenset(getattr(b['factory'], 'depends_on_projects')) == projects
]
- automatic_scheduler_name = ",".join(sorted(projects))
+ automatic_scheduler_name = filter_branch + ":" + ",".join(sorted(projects))
projects_to_filter = getProjectsToFilter(projects)
automatic_schedulers.append(
@@ -60,7 +81,7 @@
name=automatic_scheduler_name,
treeStableTimer=treeStableTimer,
builderNames=sch_builders,
- change_filter=ChangeFilter(project=projects_to_filter)
+ change_filter=ChangeFilter(project=projects_to_filter, branch=filter_branch)
)
)
@@ -67,6 +88,6 @@
log.msg(
"Generated SingleBranchScheduler: { name='%s'" % automatic_scheduler_name,
", builderNames=", sch_builders,
- ", change_filter=", projects_to_filter,
+ ", change_filter=", projects_to_filter, " (branch: %s)" % filter_branch,
"}")
return automatic_schedulers
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D69159.225570.patch
Type: text/x-patch
Size: 3721 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191018/20bd5786/attachment.bin>
More information about the llvm-commits
mailing list