-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
Help wanted: Backporting to v11.x #25403
Comments
Oh, and for anybody who wants to help: Really, please take a look at the oldest PRs first. These PRs tend to touch a lot of common code, so first backporting one of the more recent ones is going to make backporting the older ones even harder. Partial backports would also help tremendously. |
The numbers of open backport requests is now down by ~40%. Most still open ones do not seem to be trivial to backport though. |
Looks like the ones left are mostly @joyeecheung , a handful of @addaleax , and one @cjihrig --- the master refactors are great, but if they aren't backported they might form a wall beyond which even small changes won't cherry-pick without conflict. |
One observation: the relationships between the PRs pending backports seem to be similar. If the commits touching a particular file are landed on master as A-B-C-D-E...-Z, oftentimes is no point trying to cherry-pick B/C...Z without backporting A first where A:
It usually makes the situation worse if one of the later commits is backported manually out-of-order, say, H - then every commit in the chain may not be landed cleanly even if someone manage to backport A on top of H, to make the subsequent cherry-picking easier the prematurely-backported H has to be reverted first. (It should be possible to make some smarter tools to at least be aware of the dependencies of commits for a particular file, e.g. as demonstrated by |
Is the current cherry-picking process done manually (as per https://github.com/nodejs/node/blob/master/doc/releases.md#1-update-the-staging-branch ) or is that streamlined somehow? If so the streamlining should take #25403 (comment) into account, adding some additional labels (like |
I've noticed the issue with out of order backports as well, things can get progressively worse. I haven't worked actively on LTS branches in the last year, but the process is pretty flexible. The -staging branches can be rewritten, its not necessary to "git revert" commits on them, for example, they can be dropped. I'm not sure what the meaning of /cc @BethGriggs |
It is possible to reorder the commits after the backports are merged, but when someone who is not a releaser trying to backport locally (and open backport PRs afterwards), reverting those commits would help getting the tree into a shape that is easier to cherry-pick on cleanly. |
We ran into issues like these before and we also spoke about these things a couple of times (e.g., on the collaborator summit). For me there's really just one way to solve this issue (that I am aware of): as soon as a releaser hits a PR that they are not able to backport we block the next release until it's backported (or what ever it relies upon). This normally only applies to PRs which refactor a lot or which imply a deep understanding of a specific code part. It could get more difficult after a while if we have big breaking changes but there's also often also a remedy for that: we could start backporting semver-major PRs in a non-breaking fashion. It often makes sense to have bigger code changes than the actual breaking change (as in: the other code changes might not be necessary without the actual breaking part). So backporting those non-breaking parts would be great as well. But enforcing this is difficult as we can not expect everyone who opens a PR to always be available for backporting and we someone else might have to do it instead at times (which is not always that easy). We could give that a try if others agree to it as well. I believe in that case, not only the @nodejs/releasers but all @nodejs/collaborators should agree to it. |
BTW I am writing a tool to help analyzing the dependencies of commits Though currently it is quite slow..(also it does not handle ill-formatted commit messages, like in the screenshot the console commit is backported, just that the backported commit has |
Definitely true for non-collaborator PRs, and for people who make occaisonal contributions, but I think its reasonable to encourage (strongly encourage?) regular contributors to node to do the work to get their PRs into shape to be released. If they can't, they can also respond with a request for help. It would be nice if some tooling auto-labelled and posted into PRs telling people after they merge whether they land clean in the release staging branches. Would adding this to |
@sam-github I think this should be preferably be done by the bot, as switching between branches locally may break people's workflows. Also as I explained in #25403 (comment) it's not a simple matter of backporting PRs as soon as possible, they should also be backported in the correct order to reduce conflicts, otherwise the backports may be even less productive. |
Agreed. Still, the correct order is likely the order they land in master... so reminding people to backport once it lands is close to the correct order. It may be useful to at least give them (or whoever is running In the case that their PR doesn't land clean in staging because it depends on a previous PR to master that hasn't been backported yet, then yes - their backport is blocked, they shouldn't start backporting yet. That's useful information. What kind of conditions can bots respond to? As commits land in staging branches, the status of PRs in terms of whether they do or do not need backporting changes... they might initially appear to need backporting, but are better described as blocked by a previous PR that has not (yet?) backported -- once the previous PR is backported the PR in question may change from "backport needed" to "cherry picks clean". |
I think we need a sort of simple status website that reports which is the next PR that either needs to be backported or marked don't land. |
@sam-github I am afraid backporting every PR ASAP is too stressful for both the contributors and the releasers unless we automate the work of finding out the conflicts and dependencies and pinging for backport somehow. The knowledge of the relationship among PRs needs to be tracked properly so having multiple human beings share the work could result in extra overhead ( We could ultilize the fact that if we have PR landed in the order of A-B-C, where:
then most of the times, it does not really matter if they are backported in the order of ACB or ABC - we usually only care that C should be backported after A. Sometimes B may still be relevant even if there's no obvious dependency in the changed files but according to my observation that's pretty rare. |
hey @sam-github, I have some tooling like that already in place in another org, which could take place here in the following steps:
Would this type of process help? I'm happy to clean up that tooling for this specific purpose and work to get it going if so! |
@codebytere I'm not active on the LTS WG any more, and its the people doing the work who should comment, but I suspect that wouldn't help node so much. FYI, releasing relies heavily on https://github.com/nodejs/branch-diff, which is used to determine commits that need to be merged down. It skips commits that have already been cherrypicked (so differ by SHA), and it also skips (for most use-cases) Its output is then fed into git cherry-pick, and it trundles along until a commit fails to pick clean, and the person running the tool checks out if its trivially fixable, and if not, adds the I think there must be some kind of automation that could help here, but you can see that in our process the adding of the label already means that the PR is known to not backport, so having a bot confirm that isn't necessary. Also, analyzing whether a PR backports requires first cherry-picking all the commits before it except for the semver-major, otherwise it will likely fail to cherry-pick standalone, but that's a false negative, it might just needs its deps to land first. |
I think we’re caught up to a “normal” level of pending backports now – thanks @joyeecheung and @BridgeAR for the backporting work! I’ll close this as this particular issue has been resolved now, but we may want to spend some time thinking about how we deal with this kind of situation in the future. |
Reopening because this is starting to be a problem again. |
@addaleax - I reviewed the list of current items, and thought will spend some effort clearing it a bit. Looking at the oldest one, #25263 has a file (for example |
@gireeshpunathil I’m not sure, @joyeecheung might be able to tell your more about the PR and what it conflicts with… |
Here is the list of commits that are waiting to be backported, in the order that they landed on master:
|
Hi - I was poking around on some of these commits to see about helping out. However, in a lot of cases, it's not very simple. For example, Joyee's pull request #25263 landed after a |
Forgot to mention: I landed the tool described #25403 (comment) in node-core-utils as I plan to work on a flag that detects semver-ness (which requires network access) when requested in the prompt for that tool before releasing it. |
I am not entirely sure why #24965 has to be semver-major but I think in this case #25263 has to be recreated on v11 rather than being backported using git magic. (It's easier to tell what needs to be done from https://github.com/nodejs/node/pull/25263/files?w=1 which strips the indentation changes) |
I updated the list |
We're back to a good state. Thank you everyone who helped :) |
Hi @nodejs/collaborators ! Backport requests to
v11.x-staging
are queuing up and it’s getting pretty problematic.If you feel like you can pick up items from https://github.com/nodejs/node/issues?page=2&q=label%3Abackport-requested-v11.x+is%3Aclosed, in particular some of the older ones, that would help a lot. The backporting guide is here, for those who want to revisit :)
In the meantime, I would consider measures like marking all PRs that mostly move code around as
blocked
, so that at least the problem doesn’t get worse. What do you think?The text was updated successfully, but these errors were encountered: