Use a (smart) set of branches for branch selection#752
Conversation
| yield _maintenance_branch(3, 13) | ||
| yield _maintenance_branch(3, 12) | ||
| yield _maintenance_branch(3, 11) | ||
| yield _maintenance_branch(3, 10) |
There was a problem hiding this comment.
(Sidenote, not for this PR): I wonder if we could get away with pulling the canonical branch info file and generating branches from it. Or maybe rather than pulling it on startup, use Salt to pull on a schedule and stash it in a known location, and trigger a restart on changes.
| host_configure_cmd = ["../../Tools/wasm/wasi-env", "../../configure"] | ||
|
|
||
| # See comment in _Wasm32WasiPreview1Build.__init__ | ||
| branches = {BRANCHES[3, 11], BRANCHES[3, 12]} |
There was a problem hiding this comment.
This will blow up on us when 3.11 goes away, but CI should catch it. I'm not sure we should change anything for that fact, but it is something for us to be aware of.
| extra_tags.append("nondebug") | ||
| self.buildersuffix += self.append_suffix | ||
| if self.pydebug: | ||
| # The debug the WASI buildbot is meant for 3.11 and 3.12 only. |
There was a problem hiding this comment.
Nit:
| # The debug the WASI buildbot is meant for 3.11 and 3.12 only. | |
| # The debug WASI buildbot is meant for 3.11 and 3.12 only. |
| method="clobber", | ||
| shallow=True, | ||
| # Disable the default, if set | ||
| filters=None, |
There was a problem hiding this comment.
Ah, I hadn't yet realized my PR was merged; I was going to update it to something very close to what you had suggested, but hadn't made it back to it yet :)
Add a
branchesattribute on worker, builderdef & buildfactory objects. This is a set(-like) of branches the object applies to.The set of all branches is exposed as
branches.BRANCHES, in a custom object with some convenience APIs.This replaced several ways of filtering which branches apply to a given build:
builders.ONLY_MAIN_BRANCH-- a set of name fragments; builds with matching names are limited to the main & PR branchbranches¬_brancheslists: these were usually for testing a feature introduced in 3.X, or made obsolete in 3.X. I tried several variants before settling ononly_since&only_until.wasm_tier& thewasmtag. This PR happened to bring the WASM skipping logic to one place, with comments talking about specific versions. So I removed thewasm_tierattribute on BranchInfo objects.Let me know if this seems like a good direction.
I made the
generate_builderdefsfunction from #736 takeBuilderDefobjects in addition to tuples. Avoiding unrelated moves makes for simpler diffs.I'm filing PRs with individual changes from @zware's branch, to review/test/fixup/revert the changes one by one. This is based -- very loosely this time -- on 82eb39d.