Git Mailing List Archive mirror
 help / color / mirror / Atom feed
* What are good reasons to use trunk-based dev, as opposed to release branch to release branch?
@ 2024-04-07 17:16 David Karr
  2024-04-07 17:39 ` rsbecker
  0 siblings, 1 reply; 2+ messages in thread
From: David Karr @ 2024-04-07 17:16 UTC (permalink / raw)
  To: git

Personally, I always use trunk-based development.  New changes go into
feature branches from master, and are merged to master after approval.
When we're ready to make a release, we create the release branch from
master, very few changes go into the release branch after we cut it.
Any changes that have to go into the release branch are first merged
to master, and then cherry-picked to the release branch.

My team maintains the "platform" for a large number of
similarly-constructed microservices. That includes the build process,
foundation libraries, and some development guidance to the teams
developing those services. We advise using trunk-based development,
but it's up to each team what they actually do.  I recently heard of
some teams doing what I would roughly call "release-to-release"
development, which means at some point in the distant past they
created a release branch from master, and then the next release they
cut from that release branch, ad infinitum.

What bothers me is that although I know this practice is wrong, I
don't think I can fully and completely describe why it is wrong, and
why TBE is better.

At a minimum, I know that with TBE, someone with no knowledge of the
repository can look at the master branch and know that represents the
latest work on the repository.

I can't very argue that their practice results in "merge hell" when
merging to master, because they never actually do that.

Can someone describe the flaws in this roughly named
"release-to-release" strategy, and why TBE is better?

^ permalink raw reply	[flat|nested] 2+ messages in thread

* RE: What are good reasons to use trunk-based dev, as opposed to release branch to release branch?
  2024-04-07 17:16 What are good reasons to use trunk-based dev, as opposed to release branch to release branch? David Karr
@ 2024-04-07 17:39 ` rsbecker
  0 siblings, 0 replies; 2+ messages in thread
From: rsbecker @ 2024-04-07 17:39 UTC (permalink / raw)
  To: 'David Karr', git

On Sunday, April 7, 2024 1:17 PM, David Karr wrote:
>Personally, I always use trunk-based development.  New changes go into feature
>branches from master, and are merged to master after approval.
>When we're ready to make a release, we create the release branch from master,
>very few changes go into the release branch after we cut it.
>Any changes that have to go into the release branch are first merged to master, and
>then cherry-picked to the release branch.
>
>My team maintains the "platform" for a large number of similarly-constructed
>microservices. That includes the build process, foundation libraries, and some
>development guidance to the teams developing those services. We advise using
>trunk-based development, but it's up to each team what they actually do.  I recently
>heard of some teams doing what I would roughly call "release-to-release"
>development, which means at some point in the distant past they created a release
>branch from master, and then the next release they cut from that release branch,
>ad infinitum.
>
>What bothers me is that although I know this practice is wrong, I don't think I can
>fully and completely describe why it is wrong, and why TBE is better.
>
>At a minimum, I know that with TBE, someone with no knowledge of the repository
>can look at the master branch and know that represents the latest work on the
>repository.
>
>I can't very argue that their practice results in "merge hell" when merging to master,
>because they never actually do that.
>
>Can someone describe the flaws in this roughly named "release-to-release"
>strategy, and why TBE is better?

There are advantages and disadvantages to both. The key reason for release-to-release is to allow multiple releases to be simultaneously prepared with different features in each. TBE is fundamentally cumulative, with branches for new features and fixes. It supports development well but is not conducive to controlled production deployment. The TBE can be used at the same time as release-to-release. Developers work in TBE and should, IMO. But using merge-squash pull requests into release branches allows different ordering of features to be deployed in varying order (called sequencing). I would say, though, that continually basing release branches off of previous release branches is not a good practice as it does not allow any history cleanup - important when git is used as an release object repo. There should be a separate release main branch off which release branches are based. Fix release can be based off of their related base release branch, but main releases should not really be based off of other main releases. Periodic synchronizing of the TBE main with the release main can line things back up to reduce future conflicts.

The key take-away, perhaps, is that the two concepts are not mutually exclusive.

Just my thoughts.
--Randall


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-04-07 17:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-07 17:16 What are good reasons to use trunk-based dev, as opposed to release branch to release branch? David Karr
2024-04-07 17:39 ` rsbecker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).