[RFC] Deprecate email code reviews in favor of Phabricator

Statement:

Our current code review policy states[1]:

“Code reviews are conducted, in order of preference, on our web-based code-review tool (see Code Reviews with Phabricator), by email on the relevant project’s commit mailing list, on the project’s development list, or on the bug tracker.”

This proposal is to limit code reviews only to Phabricator. This would apply to all projects in the LLVM monorepo. With the change in effect, the amended policy would read:

“Code reviews are conducted on our web-based code-review tool (see Code Reviews with Phabricator).”

Current situation:

I don't mind formalizing that reviews are done on phabricator only. However following projects that way would, most probably, have one quite notable drawback compared with the current mailing list based approach:

Right now, it's easy to distinguish between mails requiring different levels of attention; ones with me in the To or CC fields are more visible and I try to read all of them. I have personal Herald rules that CC me on topics that I track. But I also browse the rest of the mails (quickly glancing usually only) for other topics I might be interested in.

My suspicion is that if the mail delivery is in the form of a personal subscription directly from Phabricator, it becomes much harder to distinguish mails that stem from just following a project as a whole, vs ones where I'm specifically CCd.

On the other hand I guess there can be other ways of filtering the mails do distinguish between those cases, so maybe it would be manageable?

// Martin

Hello,

I have started reading the tutorial about writing a LLVM backend, but I got stuck very quickly following it.
The tutorial says that it focuses on existing examples from llvm/lib/Target, in the LLVM release. As far as
I can see, the current release versions of LLVM do not contain these examples.

I did find the examples in the source distribution of LLVM, and currently I am building the source, however
my question is the following:

Is it possible to develop a LLVM backend using for example the LLVM distribution available by default
on Ubuntu (20.04), or possibly the binary distribution for Windows?

Best regards,

Viorel Preoteasa

Strong, effectively blocking, -1 to shutting down -commits lists,
or affecting their current behaviour in any way.

The only thing i think you want to change is to codify that all new patches
should be submitted to review via phabricator.

Roman

Wouldn't this make it more difficult for sites that archive the lists?
Right now it all works. If the lists were eliminated then it would be
harder to archive. Not impossible, but it would be more work.

Plus, how long would it take for archive sites to switch over? How much
history would only exist in Phab's database?

Couldn't the commit lists be made read-only except from Phab? That would
force reviews to happen on Phab but otherwise keep all existing email
setups working.

I'll defer to Christian the discussion about this section.

+Christian

Don't leave llvm-dev out this time...

Hello

Development of new backend assumes working with LLVM source code

I occasionally respond the email list to report a broken commit,
especially if the commit was not based on a Phabriacator review.

However, Phabricator also create a discussion page for each commit, I
could just add a comment there.

Is there still a discussion to eventually move to reviews on GitHub?
That might have an influence on what we are going to do with *-commits
mailing lists?

Michael

In my view, this email is really too different topics. Given that, my response is split into two parts.

First, should we make phabricator our default for code review? I am not opposed to this. I don’t particular support it either, but I would not spend time arguing against it. I would suggest that we re-frame the proposal to distinguish precommit and post commit review - with only the former moving to phabricator. I have not seen post-commit done successfully on phabricator to date in any wide spread manner.

Second, should we consider retiring llvm-commits and the other mailing lists? My gut response is a flat out NO!!! What we have works. I am highly reluctant to run the risk of breaking our existing processes - which for all their problems mostly work - for the, to me, seemingly very minimal value obtained by moving away from email discussion. Post commit review in email works. I strongly suspect that if you try to change that, you will either simply drive out post commit review discussion (bad idea!) or discussions will move to private email exchanges (bad idea!). I’m open to being convinced here, but the burden of proof is high. The risk we’d be talking about with such a transition is immense.

Philip

In my view, this email is really too different topics. Given that, my response is split into two parts.

I agree: in particular our code review process seems a bit disjoint from the “I want to keep a feed of the project activity” that the commit lists are offering. Seems best to me to look at these two considerations separately.

First, should we make phabricator our default for code review? I am not opposed to this. I don’t particular support it either, but I would not spend time arguing against it. I would suggest that we re-frame the proposal to distinguish precommit and post commit review - with only the former moving to phabricator. I have not seen post-commit done successfully on phabricator to date in any wide spread manner.

In general I do all of my post-commit review by commenting on the original revision. This has the nice side-effect that it allows me to do it without being subscribed to a commit mailing-list (I’m subscribed to llvm-commits@ but not to all the project specific ones). Phab also has the ability to comment on commits themselves, so that it works even when someone skipped the review, but the advantage of the original review is that all the reviewers/subscribers get CC’d on your post-commit review and this keeps a single thread of discussion.

Hi Martin,

I don’t mind formalizing that reviews are done on phabricator only.
However following projects that way would, most probably, have one
quite notable drawback compared with the current mailing list based
approach:

Right now, it’s easy to distinguish between mails requiring different
levels of attention; ones with me in the To or CC fields are more visible
and I try to read all of them. I have personal Herald rules that CC me on
topics that I track. But I also browse the rest of the mails (quickly
glancing usually only) for other topics I might be interested in.

Having your own, custom Herald rules is always superior to general rules for a project. They are naturally targeted towards your use cases. However I wanted to offer a proper email integration for all users without having to write their own rules. So the idea was to offer a “similar enough” alternative for the XXX-commits mailing lists.

I just checked your rules [1] and you add yourself to the list of subscribers for certain revisions. For these notifications you should be on the “TO” section of the email, right?

The emails going through the project [1] are sent as CC to me. There is a ton of header attributes that could be used for filtering:

X-Phabricator-Cc:

X-Herald-Rules: <74>, <368>, <665>, <667>, <671>, 700>, <576>, <615>, <770>

X-Phabricator-Stamps: actor(@bruno) application(Differential) author(@bruno) herald(H74) herald(H368) herald(H576) herald(H615) herald(H665) herald(H667) herald(H671) herald(H700) herald(H770) monogram(D99434) object-type(DREV) phid(PHID-DREV-6ivftbt7xso57bvmy2br) reviewer(@aralisza) reviewer(@delcypher) reviewer(@dvyukov) reviewer(@kubamracek) reviewer(@vitalybuka) reviewer(@yln) revision-status(needs-review) subscriber(@hoy) subscriber(@jfb) subscriber(@kubamracek) subscriber(@llvm-commits) subscriber(@lxfind) subscriber(@modimo) subscriber(@rjmccall) subscriber(@t.p.northover) subscriber(@wenlei) tag(#llvm) via(web)

Do you think this is good enough for filtering?

[1] https://reviews.llvm.org/H746
[2] https://reviews.llvm.org/H770

Best,
Christian

Hi Roman,

Strong, effectively blocking, -1 to shutting down -commits lists,
or affecting their current behaviour in any way.

Can you please give a reason for that?
How are you using these mailing lists?

The only thing i think you want to change is to codify that all new patches
should be submitted to review via phabricator.

+1 on that.

Best,
Christian

Hi Michael,

Is there still a discussion to eventually move to reviews on GitHub?
That might have an influence on what we are going to do with *-commits
mailing lists?

Fair point. I don’t think we have a decision to move to Pull Requests. So I would discuss the current change around the options we get from Phabricator.

If we ever move to Pull Requests, we would certainly have to discuss the email workflows for that…

Best,
Christian

Hi Christian,

Having your own, custom Herald rules is always superior to general rules for
a project. They are naturally targeted towards your use cases. However I
wanted to offer a proper email integration for all users without having to
write their own rules. So the idea was to offer a "similar enough"
alternative for the XXX-commits mailing lists.

I just checked your rules [1] and you add yourself to the list of
subscribers for certain revisions. For these notifications you should be on
the "TO" section of the email, right?

No; for revisions where I'm only listed as a subscriber, I'm in CC, for revisions where I'm reviewer or author, I'm in the TO field.

The emails going through the project [1] are sent as CC to me. There is a
ton of header attributes that could be used for filtering:

      X-Phabricator-Cc: <PHID-PROJ-6nrw7h47scgenrj2njpx>

      X-Herald-Rules: <74>, <368>, <665>, <667>, <671>, 700>, <576>,
      <615>, <770>

      X-Phabricator-Stamps: actor(@bruno) application(Differential)
      author(@bruno) herald(H74) herald(H368) herald(H576)
      herald(H615) herald(H665) herald(H667) herald(H671) herald(H700)
      herald(H770) monogram(D99434) object-type(DREV)
      phid(PHID-DREV-6ivftbt7xso57bvmy2br) reviewer(@aralisza)
      reviewer(@delcypher) reviewer(@dvyukov) reviewer(@kubamracek)
      reviewer(@vitalybuka) reviewer(@yln)
      revision-status(needs-review) subscriber(@hoy) subscriber(@jfb)
      subscriber(@kubamracek) subscriber(@llvm-commits)
      subscriber(@lxfind) subscriber(@modimo) subscriber(@rjmccall)
      subscriber(@t.p.northover) subscriber(@wenlei) tag(#llvm)
      via(web)

Do you think this is good enough for filtering?

Hmm, maybe. The issue is pretty much the reverse - if I'm listed as explicit subscriber but also subscribe to the "project", those mails would still have the same tags.

So is there a way to distinguish mails where I'm an explicit tagged subscriber (and thus in CC, also e.g. for reviews where I've taken part in discussion) and I'm also getting them via the project subscription (so the mail does have all the tags for subscription delivery)? Or would I be getting two mails for that situation, once for the project subscription and once for personal subscription to the individual review?

// Martin

Hi Philip,

In my view, this email is really too different topics. Given that, my response is split into two parts.

IMHO they belong together: If we stop doing code reviews on the mailing list, folks would lose the ability to reply to reviews via email. If we want to give back the reply-via-email option, getting the emails from Phabricator is the best option I know.

First, should we make phabricator our default for code review? I am not opposed to this. I don’t particular support it either, but I would not spend time arguing against it. I would suggest that we re-frame the proposal to distinguish precommit and post commit review - with only the former moving to phabricator. I have not seen post-commit done successfully on phabricator to date in any wide spread manner.

Why would you make that distinction? You can comment on any commit via Phabricator. Last week I received some feedback and that worked as expected: https://reviews.llvm.org/rG7f9717b922d421c30f889034488563c67076aca1

If we would use the notifications directly from Phabricator you could reply to these commits as you do now and they get integrated into Phabricator again. This was the my main reason for proposing this.

Second, should we consider retiring llvm-commits and the other mailing lists? My gut response is a flat out NO!!! What we have works.

Well it works for the notification parts, but not for replying via email.

With the argument “What we have works.” you can basically stop any development on all of LLVM. I don’t think this is what we want. I suppose we want to make changes that cause gradual improvements over time. On our code base but also on our development processes.

I am highly reluctant to run the risk of breaking our existing processes

Can you give some examples of these processes?

I am currently aware of 2 use cases and I think we can properly implement both via Phabricator emails:

  1. notify users about code reviews and commits
  2. reply to reviews and commits via email

I strongly suspect that if you try to change that, you will either simply drive out post commit review discussion (bad idea!) or discussions will move to private email exchanges (bad idea!).

Why do you think that?
Users need to sign up once for the projects in Phabricator and then everything works as before. You just get your emails directly and not via a mailing list…

Best,
Christian

Hi Martin,

Hmm, maybe. The issue is pretty much the reverse - if I’m listed as
explicit subscriber but also subscribe to the “project”, those mails would
still have the same tags.

You should be able to create an email filter for that:
Check if the header field “X-Phabricator-Stamps” contains “subscriber(mstorsjo)”. This should give you only the emails where you’re a subscriber of the review.

Unfortunately I haven’t found a way to configure Gmail. Looks like you cannot search for substrings in headers :frowning:

So is there a way to distinguish mails where I’m an explicit tagged
subscriber (and thus in CC, also e.g. for reviews where I’ve taken part in
discussion) and I’m also getting them via the project subscription (so the
mail does have all the tags for subscription delivery)? Or would I be
getting two mails for that situation, once for the project subscription
and once for personal subscription to the individual review?

So far I only received one Email per update, however I did not run explicite tests for that.

Feel free to join the project I set up and do some experiments:
https://reviews.llvm.org/project/manage/104/

Best,
Christian

Statement:

Our current code review policy states[1]:

“Code reviews are conducted, in order of preference, on our web-based code-review tool (see Code Reviews with Phabricator), by email on the relevant project’s commit mailing list, on the project’s development list, or on the bug tracker.”

This proposal is to limit code reviews only to Phabricator. This would apply to all projects in the LLVM monorepo. With the change in effect, the amended policy would read:

“Code reviews are conducted on our web-based code-review tool (see Code Reviews with Phabricator).”

Personally, I am in favor of this policy for initiating code reviews,
but am opposed to it for post-commit feedback. The problem, as I see
it, is that not every change *gets* code review via Phab and the email
lists are the only place on which to provide that post-commit
feedback. This largely comes up in two ways: NFC changes and changes
made by code owners in the area of the compiler which they own. We
still need *some* mechanism by which to provide them post-commit
feedback. Currently, the way we provide that is frequently via an
email reply to the commit message on the *-commits list so that the
issue can be seen by both the patch author and the community at large.

Current situation:

In a recent llvm-dev thread[2], Christian Kühnel pointed out that pre-commit code reviews rarely originate via an email (most are started on Phabricator), although, as others pointed out, email responses to an ongoing review are not uncommon. (That thread also contains examples of mishaps related to the email-Phabricator interactions, or email handling itself.)
I don’t have specific information about post-commit reviews. It seems like the most common form is an email reply to the auto-generated commit message, although (in my personal experience), “raising a concern” in the commit on Phabricator or commenting in the pre-commit review is usually sufficient to get author’s attention.
We have Phabricator patches that automatically apply email comments to the Phabricator reviews, although reportedly this functionality is not fully reliable[3,4]. This can cause review comments to be lost in the email traffic.

Benefits:

Single way of doing code reviews: code reviews are a key part of the development process, and having one way of performing them would make the process clearer and unambiguous.
Review authors and reviewers would only need to monitor one source of comments without the fear that a review comment may end up overlooked.
Local Phabricator extensions would no longer be needed.

Concerns:

For post-commit reviews, the commenter would need to find either the original review, or the Phabricator commit (e.g. https://reviews.llvm.org/rG06234f758e19). Those are communicated (perhaps ironically) via email, which implies that those automatic emails should remain in place.

The Phab commit message does not have any subscribers though, and so
my understanding is that comments on that Phab interface are not
communicated out to the community as a whole, which means the
community may miss out on important post-commit-review information
like general awareness of the problem, workarounds people can use
until the author corrects something, alternative ideas on how to fix
the issue, etc. Or do I misunderstand the way Phab works in this
workflow?

Also, "the commenter would need to find the Phabricator commit"
concerns me -- adding extra burden on the people providing feedback
means that *some* amount of those people will struggle enough to
simply not provide that feedback. Responding to an email is about as
low as I think we can set that bar, so the current approach has better
ergonomics for giving feedback. When I look at an existing NFC commit
email (https://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20210503/368413.html),
I don't see any direct link back to the Phabricator commit, so I have
to know to get the hash and try using that with an
https://reviews.llvm.org/rG in front of it. None of the existing links
in the email get me to where I'd need to go to add my review feedback,
but hitting the Reply button in my mail client will work. Adding a
third link and telling people "click on the link in the email" means
they've got a 50/50 shot of getting the right link because one of the
links goes to GitHub where you can also add comments.

The current policy has been in place for a long time and it’s expected that some people will continue using email for reviews out of habit or due to lack of awareness of the policy change.
Because of the larger variety, email clients may offer better accessibility options than web browsers.

Potential future direction:

This section presents a potential future evolution of the review process. Christian has conducted experiments suggesting that we can replace the XXX-commits mailing lists with notifications directly from Phabricator:

For each of the mailing lists, we create a "project" with the same name in Phabricator, e.g. [5]. Every Phabricator user can join/leave these projects on their own.
Everyone on these projects will receive the same email notifications from Phabricator as we have on the mailing lists. This is configured via "Herald" rules in Phabricator, as today, e.g. [7].

Tangential complaint -- our use of Herald causes some pain for me as a
list moderator because we've reached the point where Herald
automatically adds so many subscribers to a review that it gets marked
as spam for every email that is generated for the review. It's to the
point on cfe-dev where over half of the moderated emails are
consistently not spam some weeks. This delays the community receiving
the information while the patch reviewers/subscribers continue to get
it. In turn, this causes a problem where sometimes the people
subscribed to the patch say something is OK and the patch lands before
the community ever sees the review and has a chance to comment on it.
I'm wary of suggestions that involve heavier use of Herald until we
get that mailing list issue resolved.

Users can reply to these email notifications and Phabricator will incorporate these responses with their email client, see [6] for some example emails. Quoting and markup is supported as well.
We do NOT migrate the membership lists. Users need to sign up to the projects manually. We will send an email with instructions to the mailing lists once everything is set up.
The current XXX-commits mailing lists will be shut down
The timeline for the migration is to be defined.

Given how often Phabricator goes down (which is not super often, but
often enough that people know it happens), I am deeply uncomfortable
with the idea of shutting down the current *-commits mailing lists
because of the chance for data loss. Personally, I think the *-commits
lists are working well and I would prefer they be left alone.

~Aaron

Hi Aaron,

“Code reviews are conducted on our web-based code-review tool (see Code Reviews with Phabricator).”

Personally, I am in favor of this policy for initiating code reviews,
but am opposed to it for post-commit feedback. The problem, as I see
it, is that not every change gets code review via Phab and the email
lists are the only place on which to provide that post-commit
feedback.

You can set up notifications on commits in Phabricator. Phabricator adds the user “llvm-commits” as subscriber to certain reviews: https://reviews.llvm.org/H615
We could do the same thing for commits…

So you can reply to any commit via the web UI (or email notification) and the author gets notified as well. One example that worked for me:
https://reviews.llvm.org/rG7f9717b922d421c30f889034488563c67076aca1

The Phab commit message does not have any subscribers though, and so
my understanding is that comments on that Phab interface are not
communicated out to the community as a whole, which means the
community may miss out on important post-commit-review information
like general awareness of the problem, workarounds people can use
until the author corrects something, alternative ideas on how to fix
the issue, etc. Or do I misunderstand the way Phab works in this
workflow?

We can add automatically subscribers to commits as well if we want to.
One random example where a subscriber was added to a commit via a Herald rule:
https://reviews.llvm.org/rG93537fabcee8fcfa3316d7abd5e935f7fe9b468f

Also, “the commenter would need to find the Phabricator commit”
concerns me – adding extra burden on the people providing feedback
means that some amount of those people will struggle enough to
simply not provide that feedback. Responding to an email is about as
low as I think we can set that bar, so the current approach has better
ergonomics for giving feedback.

If we set up the notifications via Phabricator, you can reply via email. These contain a link at the bottom that will take you directly to the commit page in Phabricator. Not sure why we don’t have these on the mailing list…

Tangential complaint – our use of Herald causes some pain for me as a
list moderator because we’ve reached the point where Herald
automatically adds so many subscribers to a review that it gets marked
as spam for every email that is generated for the review.

So this would be a reason to replace the XXX-commits mailing lists with something else…

Given how often Phabricator goes down (which is not super often, but
often enough that people know it happens), I am deeply uncomfortable
with the idea of shutting down the current *-commits mailing lists
because of the chance for data loss. Personally, I think the *-commits
lists are working well and I would prefer they be left alone.

If Phabricator is down, you’re not getting any email notifications from it anyway. So we might already be losing data right now…

But fair point: The more we rely on Phabricator, the higher the reliability requirements.

Best,
Christian

I’m opposed to separating the pre- and post-commit reviews. One of the goals of this proposal is to have the entire review history in one place, and using a combination of email and Phabricator would prevent that. If I want to find out why a commit has been reverted, I have to search the post-commit emails to see what happened. I guess one could argue that pre- and post-commit reviews could happen on different pages (Dxxx vs rGxxx), but, in my view, that is still better than emails. The two concerns I have about post-commit reviews on Phabricator are that