New issue
Advanced search Search tips

Issue 726068 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: May 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

Preferred e-mail decides author with linked Gerrit accounts with multiple e-mail domains.

Project Member Reported by kjellander@chromium.org, May 24 2017

Issue description

Hi, as part of WebRTC moving to Gerrit I realized we have an identity problem to solve. If the Gerrit account is linked both to chromium.org and webrtc.org accounts (and google.com in my case), it seems like the preferred Email at CL upload time decides the e-mail identity used for the CL.

This becomes problematic for the team members that work in both Chromium and WebRTC codebases, as if a WebRTC CL is accidentally uploaded with the chromium.org e-mail, OWNERS checks may fail.

Example: You upload a CL in a dir where you're an OWNER yourself and you get a lgtm from a non-owner. Then you're normally able to commit that, but if the e-mail authoring the CL doesn't match; you can't.

What is the best way to solve this problem? For Rietveld, we used an alias DNS name for WebRTC's code review: codereview.webrtc.org. It still was the same Rietveld instance as Chromium but as long as you used different Chrome profiles, the e-mail identities never became a problem.

I imagine we might need to do something similar for WebRTC in the case of Gerrit, and ensure all team members have unlinked accounts?
 

Comment 1 by aga...@chromium.org, May 26 2017

I guess I'm not quite sure of the problem here. One of your premises I believe isn't true:

"""
If the Gerrit account is linked both to chromium.org and webrtc.org accounts (and google.com in my case), it seems like the preferred Email at CL upload time decides the e-mail identity used for the CL.
"""

This is not true. Whatever the user has configured in their local "git config user.email" is what determines the author. Gerrit doesn't re-write the author or committer fields when you upload, and git-cl-upload works locally so it uses whatever you have configured locally.

Even though the web UI will always display a single email address (whichever one you have configured as your Primary in your gerrit settings), your commits will retain whatever commiter and author fields were set locally.

So just make sure that you have the right thing configured in each individual repo on your machine (or use git's fancy new per-directory config: https://github.com/blog/2360-git-2-13-has-been-released) and then it should work as you expect.
Blocking: 672378
Summary: Preferred e-mail decides author with linked Gerrit accounts with multiple e-mail domains. (was: How to use webrtc.org accounts in parallel with chromium.org accounts?)
I double-checked now and my observation about the "preferred account" are valid.
I have user.email set to kjellander@webrtc.org in my WebRTC repo, and kjellander@chromium.org set in my global Git config.
When uploading a CL, chromium.org is set as the author: https://chromium-review.googlesource.com/518009
Even after changing user.email in the glocal config, I get the same result:
https://chromium-review.googlesource.com/518109

Then, after changing the preferred e-mail in https://chromium-review.googlesource.com/settings/ and re-uploading (wiping previous reference using git cl issue 0 between each test), the webrtc.org account is set as author:
https://chromium-review.googlesource.com/518183

This is quite a blocker for us, and also a source of confusion for users that are mixing chromium.org/google.com addresses in their work.
Blocking: -672378
Status: WontFix (was: Unconfirmed)
I'm sorry I missed your 4th paragraph about the Web UI always displaying the Primary e-mail. That explains some of the confusion.

I believe we can close this now, but it's going to be painful to explain how this works for our team members, since it's very confusing that you see one thing and another thing is being committed.

Is there no way to make the "real author" more visible in the Gerrit UI? It seems the information is there somewhere, right?
I guess the answer to #3 is to just check the commit message?

Comment 5 by aga...@chromium.org, May 30 2017

Yes, the commit message (which is part of the reviewable diff) always shows the true Author and Committer fields.

Sign in to add a comment