Idea on feature to better support dependencies in unsubmitted reviews

38 views
Skip to first unread message

Øyvind Harboe

unread,
Sep 8, 2016, 2:47:16 AM9/8/16
to Repo and Gerrit Discussion
Dependencies between multiple unsubmitted pieces of work is a necessarily hard problem to manage.

Could the workflow in Gerrit be improved in this regard with a few simple changes to Gerrit?

Thoughts?


An example:

I need to create a "New review" that depend on a couple of unsubmitted reviews and the latest master:



Problem: Normally I pick a topological sort from the above, yielding:





Idea: If I could create an octopus merge review in Gerrit GUI by typing in the list of reviews that I need to depend on(A, B, master) and the 'Rebase' button in Gerrit would recreate this review based on the latest patchset of those reviews, then I could base my 'New review' on top of that review in Gerrit:







Advantages of this approach:

1. It isolates my review from the reviews that I depend on, so that I don't accidentally rebase other reviews.
2. It isolates the reviews that I depend on. Their owners continue to work on them without it affecting subsequent reviews.
3. The reviews are built separately. This saves a ton of builds because if e.g. 'C' above fails, then I'd have to fix that before the subsequent builds will work.







PlantUML for diagrams above:

Before:

[New review] <-- [latest master]
[New review] <-- [A]
[New review] <-- [B]
note left
 This review has another
 owner and is in active
 development
end note
[B] <-- [C]

Topological sort:

[New review] <-- [A]
note left
  The owner of this review
  will not be happy if B fails,
  because he'll get a false positive.
end note
[A] <-- [B]
note left
  If this review fails,
  then A will fail too.
end note
[B] <-- [C]
[C] <-- [latest master]


After:

[New review] <-- [Octopus merge]
note left
 If I click 'Rebase' in Gerrit on this
 review, it recreates the octopus merge
 to be based on the latest patchsets
 of the reviews it depends on
end note
[Octopus merge] <-- [latest master]
[Octopus merge] <-- [A]
[Octopus merge] <-- [B]
note left
 This review has another
 owner and is in active
 development
end note
[B] <-- [C]

Darragh Bailey

unread,
Sep 10, 2016, 9:28:14 AM9/10/16
to Øyvind Harboe, Repo and Gerrit Discussion



On 8 Sep 2016 07:47, "Øyvind Harboe" <oyvind...@gmail.com> wrote:
>
> Dependencies between multiple unsubmitted pieces of work is a necessarily hard problem to manage.
>
> Could the workflow in Gerrit be improved in this regard with a few simple changes to Gerrit?
>
> Thoughts?

>


> Idea: If I could create an octopus merge review in Gerrit GUI by typing in the list of reviews that I need to depend on(A, B, master) and the 'Rebase' button in Gerrit would recreate this review based on the latest patchset of those reviews, then I could base my 'New review' on top of that review in Gerrit:
>

Any reason you don't just creat that octopus merge via git CLI or an IDE locally and then with your changes on top submit both as reviews?

Just need permission to upload merge commits.

It's definitely scriptable, and tbh, it seems that it's more likely that any developer needing this would want to be able do this in their workspace.

--
Darragh Bailey
"Nothing is foolproof to a sufficiently talented fool" - unknown

Øyvind Harboe

unread,
Sep 11, 2016, 1:50:23 PM9/11/16
to Darragh Bailey, Repo and Gerrit Discussion
On Sat, Sep 10, 2016 at 3:27 PM, Darragh Bailey <daragh...@gmail.com> wrote:
>
> Any reason you don't just creat that octopus merge via git CLI or an IDE
> locally and then with your changes on top submit both as reviews?
>
> Just need permission to upload merge commits.
>
> It's definitely scriptable, and tbh, it seems that it's more likely that any
> developer needing this would want to be able do this in their workspace.

That's what I'm doing today, but I want this possibility to me more
accessible so it's adopted more widely.

If this was as common a workflow as rebasing is, then supporting this
in the web GUI makes sense just as it makes sense to have a Rebase
button.

To me this is a powerful expansion of the existing Gerrit GUI support
for rebase: support creating octopus merges based on multiple reviews
and support rebasing these reviews on top of the latest version of
those reviews.

--
Øyvind Harboe
Reply all
Reply to author
Forward
0 new messages