Problem/Motivation
This is trying to summarize part of a conversation at DrupalCon Barcelona regarding how we keep RC/patch/minor releases on a schedule while also continue to actually accept changes.
Currently when preparing for beta releases, we have a roughly 24 hour commit freeze window around the tagging of the beta.
Additionally we sometimes schedule particular patches to land just after betas rather than just before so that there is time for them to bed-in before they're in a tagged release - i.e. particularly things where we're concerned we may not have sufficient test coverage like hook_update_N() and front-end updates.
For release candidates and patch releases, we may want longer 'commit freezes' and longer bedding in periods for particular kinds of patches. With a two week RC cycle and a four week patch release cycle, this means we end up with lots of short freezes.
While this helps to avoid paper-bag releases, it also means that we arbitrarily don't commit things at certain points during the month, and it results in an RTBC queue backlog which then has to be worked through.
With patch releases, we may also want to let certain changes sit in trunk for more than 4 weeks before they go out into a patch release, that's simply not possible if we can only commit to a single branch then tag off it every four weeks.
Proposed resolution
Introduce release branches to core development, alongside the main development branch.
The earliest time we might want to do this is for the release candidates, for example:
We open an 8.0.0-release branch.
- all changes eligible and RTBC for 8.0.x get merged to 8.0.x
- all release blockers and RC-eligible changes are cherry-picked to 8.0.0-release
- all release candidates and 8.0.0 are tagged from the 8.0.0-release branch
Then, once 8.0.0 is tagged, we'd probably do the following:
Open a new release branch 8.0.1-release based off 8.0.x. This will contain all the changes we committed/merged but did not actually release during RC/8.0.0. We then continue to commit everything to 8.0.x, and during that month, only cherry-pick a subset of issues back to 8.0.1-release. Then 8.0.1 has lots of changes, but the bulk are ones we made during release candidate and have had a long testing lead time.
Remaining tasks
1. Figure out what happens with DrupalCi and release branches. afaik it's not possible to have branch-level testing on x.x.x-suffix branches. Can we work around that by having a branch literally called '8.0.0' though?
2. We'd probably want to test patches against 8.0.x, commit and push to that branch, then move the version to 8.0.0-release, make sure they're green, then cherry pick. Otherwise we can't be 100% sure about incompatibilities with other patches. This is a bit long-winded but would only be a for a subset of patches though.
3. We may run into issues where patches apply against 8.0.x, but don't apply against the release branch. In those cases they might just have to skip a patch release then.
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | Screen Shot 2015-10-06 at 2.37.24 PM.png | 43.98 KB | webchick |
| #12 | Screen Shot 2015-10-06 at 2.35.11 PM.png | 10.89 KB | webchick |
| #12 | Screen Shot 2015-10-06 at 2.22.58 PM.png | 44.46 KB | webchick |
Comments
Comment #2
MixologicWe can test any Branch/Tag in the repo, and should be able to test any Hash or Ref we want.
Comment #3
catch@Mixologic does the ui allow for that too? Possibly this was a pifr limitation that no longer holds.
If that works the other question with Drupalci is testing contrib against multiple core branches.
Comment #4
catchComment #5
xjmThe problem with this I think is that it's the wrong way around. The criticals and RC targets should not have to worry about chasing HEAD; part of the point of freezing commits is to ensure they go in as quickly as possible and without disrupting other stuff or being disrupted.
I think it could only work if we commit toAh no, that doesn't work either, because the issues should still be filed against 8.0.x-dev.8.0.0-releasefirst and merge it into8.0.x-dev, but then we still have to manage merge conflicts or revert patches that don't merge, and reopen those issues to be updated.I also don't want to commit ourselves (pun!) to committing lots of RTBC issues to 8.0.x-dev during the RC phase. To me, that also interferes with the goal of tight focus during RC.
Comment #6
xjmUnless we explicitly added
8.0.0-releaseto the d.o version field. Then we could file RC targets and criticals against that branch, and specify that all other issues were filed against dev, I guess.Still carries the other concerns though.
Comment #7
catchI think it partly depends how RC goes. If we have one critical issue a week and they're small patches, commit conflicts aren't a big deal - but we still want to use release windows and not rush things.
If we have one a day, then we're not going to be committing anything else anyway.
Even if we don't do this during RC, I think it will be useful from 8.0.0 onwards.
Comment #8
drummI don't think this is (currently) supported on Drupal.org. Project issue file test module tests against branches with release nodes; Project release & version control project release modules won't recognize the branch name as following the standard.
Following the pattern of using
xin branch names, I think it would make sense to call the potential branch8.0.0-x. The bit after the-is called "extra"; extra can be anything. (rc/beta/alpha/unstable are special extra components, they get put in that order when sorting.)Reading the code, there might not actually be something technically stopping a
8.0.0-xrelease. It is worth trying out on staging, if that will work for core. (Or even on production with a contrib module, the equivalent would be8.x-1.0-x.)Comment #9
webchickIs there a staging environment or whatever where we could test out #8? For example, a branch named "8.0.0."
Just to say this would indeed be really awesome from a release management POV. We're likely to end up with a 6+ page RTBC queue backlog (or worse, drive off all of the core contributors we have now) without something like this during RC.
Comment #10
drummstaging should be ready, but it is under-tested. My recommendation for testing was
8.0.0-x, would that work for core? That is much more likely to work without code changes.Comment #11
webchick@drumm just helped me test this on staging, but unfortunately 8.0.0-x doesn't work. It won't show up in the selection to create a release against. :\
Line 111 here is the problem: http://cgit.drupalcode.org/drupalorg/tree/drupalorg_versioncontrol/plugi.... It specifically locks down to digit.digit."x"
Comment #12
webchickUpdate: "8.00.x" passes the regex. EVIL GRIN. https://staging.devdrupal.org/node/2580084
One nice thing about this too is it allows for more granular test configuration; for example, we could choose to test PostgreSQL/SQLite/PHP7 on branch + commit for the "RC" branch instead of nightly, without driving up the testbot bill exponentially:
The branch tests show up as a separate heading:
Also confirmed that the "- 8.x issues -" filter picks issues filed against this branch up, e.g. https://staging.devdrupal.org/node/2454653. DrupalCI kicks off too (once you've configured the branch for tests at https://staging.devdrupal.org/node/3060/qa).
You do have to watch it a bit because the "8.00.x" and "8.0.x" options are pretty hard to tell apart in a quick glance at the selection list:
...but overall these seem like solvable problems.
So, basically, I think we can do this with the existing tools and no d.o changes. The question I guess is do we want to. It does introduce extra comimt/review overhead, and we risk forgetting to cherry-pick certain things.
(I would say yes, but curious what other committers think)
Comment #13
catchThis is great.
I obviously think we should do it, otherwise I'd not have opened the issue. However I also think it's something we can do a week or more into RC when we see how things are going a bit. I'm personally not planning to commit much the first couple of days after RC anyway.
Comment #14
xjmI cannot imagine successfully explaining the differences between 8.00.x and 8.0.x to contributors. I expect it'd be a mess. We'd only have to deal with it for a couple months I guess...
But I still don't get what the process would be. Something like:
1. RC targets and criticals get filed against 8.00.x, thereby disappearing from everyone's existing bookmarks.
2. When a patch is ready for 8.00.x, we commit it to that branch. We then try to cherry-pick them from 8.00.x to 8.0.x, reverting other 8.0.x work mercilessly if it conflicts.
3. Other issues proceed as normal against 8.0.x if they meet our criteria for patch releases, and are committed to 8.0.x normally, aside from the "merciless revert "thing.
4. Stuff that we have agreed is not eligible for the early Patrick leases gets explicitly postponed to 8.1.x.
Comment #15
xjmAlso, if we do do this, I propose that we do not start until after RC2.
Comment #16
webchickI dunno, I don't find it that confusing. Either way the X means "this is variable." (8.0.0-rc1, 8.0.0-rc2 vs. 8.0.1, 8.0.2, etc.)
Personally, all of my bookmarks point to the general "- 8.x issues -" filter, and this branch name means they do show up under there. But either way, all bookmarks pointing to 8.0.x are going to break at some point soon, so that's not really a deal-breaker for me.
Otherwise, 1, 2, 3 I think is right.
4. I have no idea what a "Patrick leases" is (assume that's Siri's version of "patch releases"? :)), but otherwise that sounds right too. And then whenever we choose to start committing things to 8.1.x, we'd have potentially 3 places it could go (but most likely won't open that branch during RC). And then 2, 3 repeats, but for 8.1.x instead.
Comment #17
catch#14 sounds about right for during RC.
Also this isn't only something I'd do during RC, could also consider it for after 8.0.0 as well:
So we have a 8.01.x branch (based off either 8.0.x or even the 8.0.0 tag) - only critical issues go into it because we want to make 8.0.1 very conservative indeed as a release.
Everything else goes into 8.0.x as before, once 8.0.1 is tagged, then we drop that branch, and 8.0.x becomes the basis for 8.0.2,
The big thing we gain from this is the ability to commit bug fixes several weeks in advance of releasing them - both in terms of RTBC backlog vs. having a freeze, and in terms of catching unexpected regressions like #2570285: Make sure TranslatableMarkup accepts string values only (at least, if that issue had caused any contrib test fails we might have caught it, which gets more likely the more contrib tests there are).
Release branches are used quite widely on site builds, and PHP is using one for the 7.0.0 release (afaik there is a 7.0.x branch, and a 7.0.0 branch - and only a few things get merged to 7.0.0), so I don't think it's too bad a concept to explain to people. The naming is not fantastic, but could be worse, and can also get improved if d.o changes happen.
Agreed with only doing it from RC2 onwards, I think we absolutely have to slow down between RC1 and RC2 just to catch up with ourselves.
Comment #18
wim leersOne thing I haven't seen explained here yet, is how we'll get those two branches back together again.
So, in a nutshell, this is what the current proposal is:
8.0.xonly receives s8.0.0.xreceives both s and other patchesThat means that the committed to both
8.0.xand8.0.0.xwill have different commit hashes. That will make things quite hard to follow.But… it sounds like eventually all commits will be cherry-picked back onto
8.0.x, in the same order. So basically8.0.0.xis then our "super RTBC queue": RTBC patches that are already committed and can already be tested together with all other patches, and therefore are more reliable, and therefore "more RTBC" than other patches. Which, if true, makes8.0.0.xa kind of "throwaway" branch, whose commit history (and commit hashes) don't matter.If this interpretation is correct, then my concern about commit hashes being different doesn't matter.
Comment #19
mile23Firstly: Ask the security team do whatever they say. :-)
This is a feature, not a bug. More like this, please. Commit freeze times are good.
Make it explicit, so that everyone understands that this is the process. During RC there are the two week cycles, but during normal release time this should be, say, a week a month.
This way everyone gets reviewed, which I think is the biggest opportunity to reduce wasted time and effort on everyone's part.
Well, the reason this is needed is to minimize rerolls, right? Everyone knows the patch releases are a thing. So we only work on one release at a time, and any grand designs for the next minor release has to reroll.
That's the only process that makes any sense, given the patch-based workflow here. Otherwise you end up with the semi-ridiculous 8.00.000.0.1.01.x branch naming scheme.
Comment #20
catch@Wim we'd cherry pick commits from the development branch to the release branch. So always the same hashes. Should only run into trouble if a commit won't cherry pick. Even then the release branch is disposable - once the release tag is cut it can be deleted.
@Mile23 I'm not talking about minor releases here, this is about patch releases. Some patches might be Rtbc for a patch release but you wouldn't want to commit them a week before cutting the tag since they might need manual/real world testing. Release branches decouple the moment of commit and the point at which that commit goes into a point release.
Comment #21
drummIf we go with a release node for testing, that makes any branch more permanent. Not that people should be using the packaged branch, but deleting the release would take it out from under them.
We might want to go more in the feature branches direction and add the UI to Drupal.org for testing effectively* arbitrary branches.
* In practice there might be rules for tested branch names, like a feature branch starts with an issue number,
2576141-rc-branch, to help keep the UI together, or not.Comment #22
catchI don't think that's a problem - we could delete the 8.0.0 release branch when 8.0.1 is released, or the next security relese, for example. If you haven't updated by then it'd serve as a useful reminder to do so.
I don't think feature branches help us very much for the majority of core changes, this is partly why I opened this issue. We have both social and technical issues with managing core releases to a schedule. Feature branches are a particular technical solution, which could help with some things but not with others.
Adding the UI for testing arbitrary branches to d.o could help us with naming/disposability, but would need to not be tied to issue NIDs (or we'd have to hack around it with an issue like '8.0.0 release branch' - that might be OK though).
Comment #23
catch@alexpott had an alternative idea which gets us more or less the same benefits with less infrastructure requirements.
1. open 8.0.1-dev as soon as we like
2. All commits go into 8.0.1-dev, criticals/rc target/rc-eligible get cherry-picked to 8.0.x too
3. Core testing happens against both 8.0.1-dev and 8.0.x (patch and branch) before commit
4. Contrib testing stays against 8.0.x
5. When 8.0.0 is tagged, we merge 8.0.1-dev into 8.0.x, and then use that solely (unless we open another new branch like 8.0.2-dev or 8.1.x). This means that contrib gets a full month of testing on 8.0.x before 8.0.1 is tagged.
The big advantage here is that assuming contrib tests only run against one branch, it's always the 8.0.x branch, and we always tag releases against that branch.
The only difference for contributors is they'll need to set core tests to run against 8.0.1-dev - having typed this, I now wonder whether that requires a d.o change though to get it in the version selector, but we can possibly do a similar hack like 8.01.x if we need to get around it.
Comment #24
webchickThe regex is linked in #11. IMO 8.0.1-dev won't pass. You can play around on https://staging.devdrupal.org though if you'd like (but drumm needs to be around since some things need manual kicking).
Comment #25
catchI think we can just replace 8.0.1-dev naming with '8.01.x' for the naming, then conceptually everything else would be the same.
Comment #26
xjmComment #27
pfrenssenI didn't see this earlier but this workflow using cherry-picks has caused the 8.0.x and 8.1.x to diverge. This has broken the tree model of the repository.
Everything that is committed to 8.0.x should also be part of 8.1.x, so in the repository's tree model the 8.0.x branch should be an ancestor of the 8.1.x branch. By using cherry-picks this is not the case, instead every commit to 8.0.x exists as a different SHA in 8.1.x, essentially duplicating these commits.
This breaks a whole bunch of git commands, low level as well as high level. We cannot trust the git log any more.
Comment #28
webchickWe discussed this issue on a call with the DA. It seems like we no longer need this, at least right now. We're getting what we need out of this by committing to 8.1.x and 8.0.x at the same time. Catch wasn't on the call though, so not marking "won't fix," but lowering priority.
#27 seems like it needs its own discussion if it doesn't have one already, since it's more about Git workflow than infra support for multiple branches.
Comment #29
alexpottComment #32
xjm@alexpott brought this up again last week or so as an idea to avoid having to backport 30-some patch-eligible issues after a minor release.
I think if we had an RC branch for a minor, we would ignore it in the issue UI. (We'd still need to temporarily add a release node for DrupalCI integration, unfortunately.) The workflow would be like what we do for security releases, except that the throwaway branch is maintained on d.o instead of just being local. So it would be something like:
Edit: I should mention that I don't actually have a problem with backporting 30-odd issues after release, but both catch and alexpott seemed to find it frustrating.
Comment #33
xjmI guess that still doesn't avoid the problem of the fact that people will have sensibly rolled their criticals against 8.3.x, not 8.3.0-release. So we might inadvertently hurt ourselves there during RC.
Comment #34
alexpottWith rc branches we probably have problems with automated test coverage.
As it turned out doing the cherry-picks on the days after 8.2.1 was not that bad. I guess the solution we followed for the 8.2.0 release period works and at least does not add much extra burden on anyone. The "patches to be ported" queue felt like a big mental burden and yet another queue to care about - but it is of a defined length and does have an end (unlike the rtbc queue). People's patches are in 8.3.x so their work will get done at defined point in the future - even if it does not land in 8.2.x.
Comment #35
catchI think we could use 8.30.x as the release branch name - it's a valid branch name, that we won't use in practice for 8.30.0 (or I sincerely hope not), so DrupalCi and everything else should just work.
Comment #36
drummFor DrupalCI - not sure if this will solve it, but #2817783: Add per-issue branch testing is in my current sprint at the Drupal Association. (Sorry I didn’t get that issue filed earlier.) That plans to make branches like
2576141-8.3.x-release,{issue nid}-{any arbitrary text}, show the testing results on the issue page.Comment #37
MixologicI think a holistic summary of the development workflow would be helpful here so we can get a better understanding of what we need to support.
Previously I had outlined some potential 'code targets' in the DrupalCI testing policy framework: https://www.drupal.org/drupalorg/docs/drupal-ci/drupalorg-testing-policy... and their labels, I'll use those labels in this comment.
I'll attempt to summarize what I *think* is happening:
There are two "Phases" to our dev cycle: 'standard', and 'prerelease'. My understanding is that if you pick an arbitrary point on this timeline (https://www.drupal.org/core/release-cycle-overview#minor), and draw a vertical line and cross two bars, its 'standard development phase', If you cross three, you are in 'prerelease phase'
During 'standard development phase', which we're in now, we've have three development branches, Major dev(9.x), Minor dev(8.3.x), and Patch dev(8.2.x). We're ignoring Major for the time being. During this phase all changes are filed against Minor dev(8.3.x) and are cherry picked back to the Patch dev(8.2.x) branch if it is a security or bugfix. For the sake of argument, we'll call this phase the "8.3 Standard Phase"
During the next *prerelease* development, we will have four eligible locations for changes: Major dev(9.x)Minor dev(8.4.x), Prerelease dev(8.3.x), Patch dev(8.2.x). For the sake of argument, we'll call this the "8.3 Prerelease Phase" (again we're ignoring Major).
This is where Im unclear as to the policy during this phase: do all changes get filed against Minor dev(8.4.x), and if they are security/bugfixes they get cherry picked back to Prerelease dev(8.3.x) and Patch dev(8.2.x)? What is the nature of the changes that need backporting after a release is cut? In this case are they changes that go immediately into Patch dev(8.3.x) for the "8.4 Standard Phase"?
If so, why weren't they eligible to be moved into Prerelease dev(8.3.x) during "8.3 Prerelease Phase" in the first place?
I think understanding that would make it easier for us to fix the options in the UI (especially if we build the workflow around labels, and not version numbers) and ensure testing is doing the right things.
As an aside, I *strongly* discourage any solution that involves hacking the version numbers. As soon as we introduce exceptions to our semver scheme, we'll have to handle those exceptions all over our codebase - everything else wont 'just work', it'd be a complicated thing that would introduce subtle bugs on the infra side. It will be much, much better for us to provide exactly what you need.
Comment #38
catchAt the moment the criteria for what can go into a release candidate is stricter than the criteria for what can go into a patch release. This means we were committing things to 8.3.x that would not go into 8.2.x release candidates, but should then go into 8.2.1
That means we have two ways to fix that (if we don't want a backlog of 'to be ported' issues):
1. Change the criteria for release candidates to be the same as patch releases
2. Have a release branch for release candidates and the initial 8.3.0 release where less commits land.
#1 is potentially an option, but it's good to know whether #2 is also an option while we figure it out.
Comment #39
MixologicCouple questions about that:
1. At what point does the criteria split? is it immediately when we go into beta of Prerelease phase? Or is it closer to the end of the Prerelease when certain bugs get pushed to the next point release? Is it when we go from beta->RC ?
2. Is the criteria for what can go in, and what gets pushed out, documented somewhere? Or can you briefly explain?
Comment #40
catch#1 it's beta -> rc - i.e. once the first rc is tagged, everything gets tightened up.
#2 there's docs at https://www.drupal.org/core/d8-allowed-changes, although I'm not sure the rc section has been updated since the 8.0.0 release candidate. A short version is 'critical + majors that we think have a low chance of introducing regressions'.
Comment #49
catchA few things have changed since 2015/2016:
We open the next minor branch much earlier than we used to, (around alpha) this means it's always possible to commit to the next minor release (or major release) during beta/rc.
We changed https://www.drupal.org/about/core/policies/core-change-policies/allowed-... so that anything patch-eligible continues to get committed to release candidates, this completely avoids having a backlog of things to go into X.0.1 and it's been working well.
There's still a short window around patch releases (24 hours either side) where we don't commit anything to the patch release (give or take a few hours and occasional critical bug fixes we don't want to wait a month to release), but because we can commit to the next minor branch during this window it doesn't hold many patches up. There are sometimes one or two things to backport after the freeze, but it's very manageable.
So going to go ahead to close this as 'works as designed'. Glad we managed to resolve the bottleneck issues without more branch management too.