All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Han-Wen Nienhuys <hanwen@google.com>
Cc: "Theodore Y. Ts'o" <tytso@mit.edu>,
	Dmitry Vyukov <dvyukov@google.com>,
	Konstantin Ryabitsev <konstantin@linuxfoundation.org>,
	Laura Abbott <labbott@redhat.com>,
	Don Zickus <dzickus@redhat.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Daniel Axtens <dja@axtens.net>,
	David Miller <davem@davemloft.net>, Drew DeVault <sir@cmpwn.com>,
	Neil Horman <nhorman@tuxdriver.com>,
	workflows@vger.kernel.org
Subject: Re: thoughts on a Merge Request based development workflow
Date: Thu, 17 Oct 2019 13:49:55 +0200	[thread overview]
Message-ID: <CAKMK7uHvcc4WvswnWMaiT+B7NV==DWB5MGj4KSkOMSukE+4=OA@mail.gmail.com> (raw)
In-Reply-To: <CAFQ2z_OVwS0Ups1QCEvJBFTsZmsw1u25bJh+a3xArjhXggLqcA@mail.gmail.com>

On Wed, Oct 16, 2019 at 8:57 PM Han-Wen Nienhuys <hanwen@google.com> wrote:
> On Tue, Oct 15, 2019 at 3:45 PM Daniel Vetter <daniel@ffwll.ch> wrote:
> > > > Last time I looked none of the common web ui tools (gerrit, gitlab,
> > > > github) had any reasonable support for topic branches/patch series
> > > > that target multiple different branches/repositories. They all assume
> > > > that a submission gets merged into one branch only and that's it. You
> > > > can of course submit the same stuff for inclusion into multiple
> > > > places, but that gives you separate discussion tracking for each one
> > > > (at least with the merge/pull request model, maybe gerrit is better
> > > > here), which is real bad.
> > >
> > > Can you say a little more about what you expect when working with
> > > multiple branches/repos?
> > >
> > > In gerrit, you can assign freeform tags ("topics") to changes, to
> > > group them. See eg.
> > >
> > >   https://gerrit-review.googlesource.com/q/topic:"rename-reviewdb-package"+(status:open%20OR%20status:merged)
> > >
> > > this will let you group changes, that can be in different repos and/or
> > > different branches. See also
> > > https://gerrit-review.googlesource.com/Documentation/intro-user.html#topics
> > >
> > > Discussions are tied to a single commit, but you can easily navigate
> > > between different changes in topics, and submission is synchronized
> > > (submitting one change will submit all of the topic. it's
> > > unfortunately not atomic).
> > >
> > > This is how submissions to Android work, as Android is stitched
> > > together from ~1000 repos. It is likely that this support will further
> > > improve, as Android is one of our biggest internal key customers.
> >
> > I think gitlab is working on this under the heading of "supermerge",
> > where you tie together a pile of changes for different repos under one
> > overall label to keep the discussion together.
> >
> > For the kernel we need something slightly different:
> > - There's a large pile of forks of the same underlying repo (Linus'
> > upstream branch). So not a huge pile of independent histories and file
> > trees, but all the same common kernel history and file layout.
> > - The _same_ set of patches is submitted to multiple branches in that
> > fork network. E.g. a refactoring patch series which touches both
> > driver core and a few subsystems.
>
> You're simplifying the android situation, and it's actually more
> similar to the linux kernel than you think. There are several hosts
> that have versions of Android (one for AOSP, one for Google, and a
> couple hosts for different partners).
>
> Then, there are a large number of branches, which represent releases.
> Changes (or sets of changes across repositories) that are submitted to
> one branch must then be propagated to other release branches, if they
> are relevant bug fixes.

This isn't about branches in the sense you seem to mean here, i.e.
different releases, or the stuff various flavours/vendors cherry-pick
together, or long-term support stuff. The workflow here is:

- submit changes to subsystem A & B
- we want the discussion to be coherent across both
- the changes land either in A or B, or a mix of A and B, or in both
places (through a topic branch that gets merged into both A and B)
- both A and B send pull requests for the same merge window (big
integration fest to start each release cycle), and from then on it's
like they all landed in the same tree

This isn't about cherry-picking a set of changes or bugfixes between
flavours or release branches or anything like that. It's about making
sure that subject experts for vastly different and fairly unrelated
areas of the kernel can all work together and avoid code conflicts,
without having to work together in the same branch/repo for
everything. Since overlapping stuff is the exception, not the rule.

> With the email workflow, isn't it hard to keep track of which patch
> went into which tree? Something that tracks the identity of commit
> (like Change-Id) as it travels across trees could help here.

Yup it's a mess occasionally, but it's at least possible to have one
discussion thread with everyone on Cc: to coordinate the mess
properly.

> > Afaiui Android has cross-tree pulls, but the patches heading to each
> > target repo are distinct, and they're all for disjoint history chains
> > (i.e. no common ancestor commit, no shared files between all the
> > different branches/patches). I'm not aware of any project which uses
> > topic branches and cross-tree submissions as extensively as the linux
> > kernel in this fashion. Everyone with multiple repos seems to use the
> > Android approach of splitting up the entire space in disjoint repos
> > (with disjoint histories and disjoint files). I've done a fairly
> > lengthy write-up of this problem:
> >
> > https://blog.ffwll.ch/2017/08/github-why-cant-host-the-kernel.html
> >
> > Android is a multi-repo, multi-tree approach, the linux kernel is a
> > monotree but multi-repo approach. Most people think that the only
> > other approach than multi-tree is the huge monolithic monotree w/
> > monorepo approach. That one just doesn't scale. If you'd do Android
> > like the linux kernel you'd throw out the repo tool, instead have
> > _all_ repos merged into one overall git history (placed at the same
> > directory like they're now placed by the repo tool). Still each
> > "project/subsystem" would retain their individual git repo to be able
> > to scale sufficiently well, through localizing of most
> > development/review work to their specific area.
>
> this is not really relevant to the Linux kernel discussion, but it's
> more complicated:
>
> * Android exists in several flavors (eg. the vanilla Google flavor,
> AOSP, the Samsung flavor, etc.). With different subrepositories,
> partners in the ecosystem can swap out components of the Android
> platform as needed, while still keeping up with some of the upstream
> repositories.
>
> * Android (AOSP) is more than 600k files, ie. 10x larger than the
> linux kernel, and about as large as the Chromium repo. Working with
> repo that large is painful because the git client itself just doesn't
> work that well to trees with that many files.

I'm not saying you're having no reasons to do this. All I'm saying is
that outside of the kernel, there's not really anyone doing it like
the kernel, mostly because the popular tools just don't really support
this workflow.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

  parent reply	other threads:[~2019-10-17 11:50 UTC|newest]

Thread overview: 102+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-24 18:25 thoughts on a Merge Request based development workflow Neil Horman
2019-09-24 18:37 ` Drew DeVault
2019-09-24 18:53   ` Neil Horman
2019-09-24 20:24     ` Laurent Pinchart
2019-09-24 22:25       ` Neil Horman
2019-09-25 20:50         ` Laurent Pinchart
2019-09-25 21:54           ` Neil Horman
2019-09-26  0:40           ` Neil Horman
2019-09-28 22:58             ` Steven Rostedt
2019-09-28 23:16               ` Dave Airlie
2019-09-28 23:52                 ` Steven Rostedt
2019-10-01  3:22                 ` Daniel Axtens
2019-10-01 21:14                   ` Bjorn Helgaas
2019-09-29 11:57               ` Neil Horman
2019-09-29 12:55                 ` Dmitry Vyukov
2019-09-30  1:00                   ` Neil Horman
2019-09-30  6:05                     ` Dmitry Vyukov
2019-09-30 12:55                       ` Neil Horman
2019-09-30 13:20                         ` Nicolas Belouin
2019-09-30 13:40                         ` Dmitry Vyukov
2019-09-30 21:02                     ` Konstantin Ryabitsev
2019-09-30 14:51                   ` Theodore Y. Ts'o
2019-09-30 15:15                     ` Steven Rostedt
2019-09-30 16:09                       ` Geert Uytterhoeven
2019-09-30 20:56                       ` Konstantin Ryabitsev
2019-10-08  1:00                     ` Stephen Rothwell
2019-09-26 10:23           ` Geert Uytterhoeven
2019-09-26 13:43             ` Neil Horman
2019-10-07 15:33   ` David Miller
2019-10-07 15:35     ` Drew DeVault
2019-10-07 16:20       ` Neil Horman
2019-10-07 16:24         ` Drew DeVault
2019-10-07 18:43           ` David Miller
2019-10-07 19:24             ` Eric Wong
2019-10-07 15:47     ` Steven Rostedt
2019-10-07 18:40       ` David Miller
2019-10-07 18:45       ` David Miller
2019-10-07 19:21         ` Steven Rostedt
2019-10-07 21:49     ` Theodore Y. Ts'o
2019-10-07 23:00     ` Daniel Axtens
2019-10-08  0:39       ` Eric Wong
2019-10-08  1:26         ` Daniel Axtens
2019-10-08  2:11           ` Eric Wong
2019-10-08  3:24             ` Daniel Axtens
2019-10-08  6:03               ` Eric Wong
2019-10-08 10:06                 ` Daniel Axtens
2019-10-08 13:19                   ` Steven Rostedt
2019-10-08 18:46                 ` Rob Herring
2019-10-08 21:36                   ` Eric Wong
2019-10-08  1:17       ` Steven Rostedt
2019-10-08 16:43         ` Don Zickus
2019-10-08 17:17           ` Steven Rostedt
2019-10-08 17:39             ` Don Zickus
2019-10-08 19:05               ` Konstantin Ryabitsev
2019-10-08 20:32                 ` Don Zickus
2019-10-08 21:35                   ` Konstantin Ryabitsev
2019-10-09 21:50                     ` Laura Abbott
2019-10-10 12:48                       ` Neil Horman
2019-10-09 21:35                 ` Laura Abbott
2019-10-09 21:54                   ` Konstantin Ryabitsev
2019-10-09 22:09                     ` Laura Abbott
2019-10-09 22:19                       ` Dave Airlie
2019-10-09 22:21                     ` Eric Wong
2019-10-09 23:56                       ` Konstantin Ryabitsev
2019-10-10  0:07                         ` Eric Wong
2019-10-10  7:35                         ` Nicolas Belouin
2019-10-10 12:53                           ` Steven Rostedt
2019-10-10 14:21                           ` Dmitry Vyukov
2019-10-11  7:12                             ` Nicolas Belouin
2019-10-11 13:56                               ` Dmitry Vyukov
2019-10-14  7:31                                 ` Nicolas Belouin
2019-10-10 17:52                     ` Dmitry Vyukov
2019-10-10 20:57                       ` Theodore Y. Ts'o
2019-10-11 11:01                         ` Dmitry Vyukov
2019-10-11 12:54                           ` Theodore Y. Ts'o
2019-10-14 19:08                         ` Han-Wen Nienhuys
2019-10-15  1:54                           ` Theodore Y. Ts'o
2019-10-15 12:00                             ` Daniel Vetter
2019-10-15 13:14                               ` Han-Wen Nienhuys
2019-10-15 13:45                                 ` Daniel Vetter
2019-10-16 18:56                                   ` Han-Wen Nienhuys
2019-10-16 19:08                                     ` Mark Brown
2019-10-17 10:22                                       ` Han-Wen Nienhuys
2019-10-17 11:24                                         ` Mark Brown
2019-10-17 11:49                                     ` Daniel Vetter [this message]
2019-10-17 12:09                                       ` Han-Wen Nienhuys
2019-10-17 12:53                                         ` Daniel Vetter
2019-10-15 16:07                           ` Greg KH
2019-10-15 16:35                             ` Steven Rostedt
2019-10-15 18:58                             ` Han-Wen Nienhuys
2019-10-15 19:33                               ` Greg KH
2019-10-15 20:03                                 ` Mark Brown
2019-10-15 19:50                               ` Mark Brown
2019-10-15 18:37                           ` Konstantin Ryabitsev
2019-10-15 19:15                             ` Han-Wen Nienhuys
2019-10-15 19:35                               ` Greg KH
2019-10-15 19:41                               ` Konstantin Ryabitsev
2019-10-16 18:33                                 ` Han-Wen Nienhuys
2019-10-09  2:02           ` Daniel Axtens
2019-09-24 23:15 ` David Rientjes
2019-09-25  6:35   ` Toke Høiland-Jørgensen
2019-09-25 10:49   ` Neil Horman

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='CAKMK7uHvcc4WvswnWMaiT+B7NV==DWB5MGj4KSkOMSukE+4=OA@mail.gmail.com' \
    --to=daniel@ffwll.ch \
    --cc=davem@davemloft.net \
    --cc=dja@axtens.net \
    --cc=dvyukov@google.com \
    --cc=dzickus@redhat.com \
    --cc=hanwen@google.com \
    --cc=konstantin@linuxfoundation.org \
    --cc=labbott@redhat.com \
    --cc=nhorman@tuxdriver.com \
    --cc=rostedt@goodmis.org \
    --cc=sir@cmpwn.com \
    --cc=tytso@mit.edu \
    --cc=workflows@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.