Git Mailing List Archive mirror
 help / color / mirror / Atom feed
From: <rsbecker@nexbridge.com>
To: "'David Karr'" <davidmichaelkarr@gmail.com>, <git@vger.kernel.org>
Subject: RE: What are good reasons to use trunk-based dev, as opposed to release branch to release branch?
Date: Sun, 7 Apr 2024 13:39:09 -0400	[thread overview]
Message-ID: <036201da8912$825b5050$8711f0f0$@nexbridge.com> (raw)
In-Reply-To: <CAA5t8Vp9ugXrgawDYA-+2mXT_RWPUUvv-rH9P+Exgb2dtvX6Sw@mail.gmail.com>

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


      reply	other threads:[~2024-04-07 17:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='036201da8912$825b5050$8711f0f0$@nexbridge.com' \
    --to=rsbecker@nexbridge.com \
    --cc=davidmichaelkarr@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).