nodejs / package-maintenance

Repository for work for discussion of helping with maintenance of key packages in the ecosystem.
Other
410 stars 145 forks source link

[best practices] managing LTS & release lines for userland modules #172

Open boneskull opened 5 years ago

boneskull commented 5 years ago

I'm starting a discussion in Mocha around how we can best support multiple "LTS" release lines.

I'm familiar with what Node.js itself does (though I haven't ever cut a Node.js release myself; it seems essentially like trunk-based development). But I don't have an understanding of all the gotchas around something like this.

It does seem that, without proper tooling, maintainers will be in for a lot of pain in addition to the extra overhead that the strategy initially incurs.

I also don't know how other teams/projects that want to do long-lived release lines do it, and would love to hear from them!

How can we, as the package maintenance team, help projects that want to take this on? What works and what doesn't?

boneskull commented 5 years ago

(I wonder if @bethgriggs might have some insight?)

mcollina commented 5 years ago

We are currently doing this in Fastify with v1 and v2. It’s not super straightforward, especially in handling backports in a semi-automated way.

dominykas commented 5 years ago

I like how semantic-release (v16, beta, not latest) solves it. Already put it in practice at work, at small scale to test - people mostly like it.

It is rather opinionated, though, so might not always be feasible.

I'm curious to hear more about what seems to be the issue?

mhdawson commented 5 years ago

@mcollina any details on what you are doing that you can share that might be input for this discussion ?

boneskull commented 5 years ago

For automating backports, maybe something like a GH Action which runs a post-commit hook against a given branch (e.g., master) that will automatically cherry-pick the changeset(s) to release branches if it passes CI? Otherwise maybe create an open PR someone can hack on? Really wouldn't know if this sort of thing would be too burdensome or failure-prone until it was up & running...

ljharb commented 5 years ago

In my experience, backports very rarely land cleanly, even if there's no git conflicts - it's always required a trivial bit of human tweaking.

mcollina commented 5 years ago

In Fastify we are currently maintaining two release lines, v1 and v2. We have no automated tool for backporting. As such, we require a backport from the original author or the PR or from the developer landing the PR - or if there is a need.

It’s a lot free form, and a bit of automation will help.

wesleytodd commented 5 years ago

In my experience, backports very rarely land cleanly, even if there's no git conflicts - it's always required a trivial bit of human tweaking.

👍 Only trivial changes are able to be backported in an automated way. I am not sure how much automation will be possible here, but would love to see a POC on the idea.

In Fastify we are currently maintaining two release lines, v1 and v2. We have no automated tool for backporting. As such, we require a backport from the original author or the PR or from the developer landing the PR - or if there is a need.

In Express we do the same as @mcollina mentions that Fastify does. As an example of one backporting effort I am involved in:

https://github.com/expressjs/express/pull/3714 https://github.com/expressjs/express/pull/3218

As you can see, the changes are quite different, and any automated backport would not have worked. That being said, any help here would have been great, because the complexity in backporting meant that this sat for quite a while without being merged, and is still in a bit of limbo.

balupton commented 5 years ago

copy of my comment here https://github.com/nodejs/package-maintenance/issues/280#issuecomment-554855494


FWIW

@bevry accomplishes the goal of this automatically for all of its packages, through the following pieces

dominykas commented 4 years ago

Adding this to agenda, if time permits - maybe we can visit this as part of #289

I'm wondering what can we do to move this forward?

Eomm commented 4 years ago

just a list of links to some articles is good enough?

We could start from that and then add a TOC in order to ease the learning process for the maintainers

dominykas commented 4 years ago

Some specific things our LTS doc should mention: