Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 570228

Summary: Cannot rebase my change in gerrit
Product: Community Reporter: David Ostrovsky <d.ostrovsky>
Component: WebsiteAssignee: Martin Lowe <martin.lowe>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: chris.guindon, matthias.sohn, twolf, wayne.beaton
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Error message none

Description David Ostrovsky CLA 2021-01-10 15:58:34 EST
I'm trying to rebase my change: [1] on Gerrit UI and getting this error:

  An error occurred
  Could not perform action: You must be a committer to push on behalf of others.:
  ----------
  Reviewing commit: d176a3e5
  Authored by: David Ostrovsky <email removed>
  
  Reviewing commit: d176a3e57beae03d2ce141fcc8796db7d650fb1a
  Authored by: David Ostrovsky <email removed>
  The author is not a committer on the project.
  The author has a current Eclipse Contributor Agreement (ECA) on file.
  The author has signed-off on the contribution.
  You are not a project committer.
  Only project committers can push on behalf of others.
  
  Please see http://wiki.eclipse.org/ECA

Screenshot is attached.

[1] https://git.eclipse.org/r/c/jgit/jgit/+/166824
Comment 1 David Ostrovsky CLA 2021-01-10 16:01:29 EST
Created attachment 285234 [details]
Error message
Comment 2 David Ostrovsky CLA 2021-01-10 16:04:37 EST
I was able to push new patch set after rebase on the CLI:

  $ git push eclipse HEAD:refs/for/master
Enumerating objects: 84, done.
Counting objects: 100% (84/84), done.
Delta compression using up to 8 threads
Compressing objects: 100% (31/31), done.
Writing objects: 100% (47/47), 12.16 KiB | 829.00 KiB/s, done.
Total 47 (delta 22), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (22/22)
remote: Processing changes: refs: 1, updated: 1, done    
remote: commit b243a71: ----------
remote: commit b243a71: Reviewing commit: b243a711
remote: commit b243a71: Authored by: David Ostrovsky <email removed>
remote: commit b243a71: 
remote: commit b243a71: Reviewing commit: b243a7114f97c0e7e075e109ccff255c6901898d
remote: commit b243a71: Authored by: David Ostrovsky <email removed>
remote: commit b243a71: The author is not a committer on the project.
remote: commit b243a71: The author has a current Eclipse Contributor Agreement (ECA) on file.
remote: commit b243a71: The author has signed-off on the contribution.
remote: commit b243a71: 
remote: commit b243a71: This commit passes Eclipse validation.
remote: 
remote: SUCCESS
remote: 
remote:   https://git.eclipse.org/r/c/jgit/jgit/+/166824 Migrate to Apache MINA sshd 2.6.0
remote: 
To ssh://git.eclipse.org:29418/jgit/jgit
 * [new reference]       HEAD -> refs/for/master
Comment 3 Christopher Guindon CLA 2021-01-11 10:32:38 EST
Martin, can you take a look a this?

What's the impact of removing this check from the ECA Validation for Gerrit:

An error occurred
Could not perform action: You must be a committer to push on behalf of others.:

Authors should be allowed to rebase their contributions using the UI if possible...
Comment 4 Martin Lowe CLA 2021-01-11 16:53:42 EST
(In reply to David Ostrovsky from comment #0)
> I'm trying to rebase my change: [1] on Gerrit UI and getting this error:
> 
>   An error occurred
>   Could not perform action: You must be a committer to push on behalf of
> others.:
>   ----------
>   Reviewing commit: d176a3e5
>   Authored by: David Ostrovsky <email removed>
>   
>   Reviewing commit: d176a3e57beae03d2ce141fcc8796db7d650fb1a
>   Authored by: David Ostrovsky <email removed>
>   The author is not a committer on the project.
>   The author has a current Eclipse Contributor Agreement (ECA) on file.
>   The author has signed-off on the contribution.
>   You are not a project committer.
>   Only project committers can push on behalf of others.
>   
>   Please see http://wiki.eclipse.org/ECA
> 
> Screenshot is attached.
> 
> [1] https://git.eclipse.org/r/c/jgit/jgit/+/166824

The issue seems to be that you are attempting to rebase a patch made by your primary account using your secondary account. If you were a committer, this would be allowed (as we allow users to push other users' code if you are a project committer) but is otherwise disallowed. The reason this worked locally is that you likely pushed using the primary account rather than the secondary account. The plugin seems to be working as intended in this case. Can you confirm that if you login with your GMX email address this does not occur?
Comment 5 David Ostrovsky CLA 2021-01-12 02:40:52 EST
(In reply to Martin Lowe from comment #4)
> (In reply to David Ostrovsky from comment #0)
> > I'm trying to rebase my change: [1] on Gerrit UI and getting this error:
[...]
> Can you confirm that if you login with your GMX email address this does not
> occur?

Yes, you are right. I logged in in gerrit with GMX email account,
but the commit message is using my secondary email account.

Can the plugin check be extended to verify all allowed email accounts?
Comment 6 Christopher Guindon CLA 2021-01-12 08:44:37 EST
(In reply to David Ostrovsky from comment #5)
> (In reply to Martin Lowe from comment #4)
> > (In reply to David Ostrovsky from comment #0)
> > > I'm trying to rebase my change: [1] on Gerrit UI and getting this error:
> [...]
> > Can you confirm that if you login with your GMX email address this does not
> > occur?
> 
> Yes, you are right. I logged in in gerrit with GMX email account,
> but the commit message is using my secondary email account.
> 
> Can the plugin check be extended to verify all allowed email accounts?

I am not convinced we should all users to modify a contribution. 

I would prefer to keep this functionality with committers and the author.
Comment 7 Christopher Guindon CLA 2021-01-12 09:41:20 EST
(In reply to Christopher Guindon from comment #6)
> (In reply to David Ostrovsky from comment #5)
> > (In reply to Martin Lowe from comment #4)
> > > (In reply to David Ostrovsky from comment #0)
> > > > I'm trying to rebase my change: [1] on Gerrit UI and getting this error:
> > [...]
> > > Can you confirm that if you login with your GMX email address this does not
> > > occur?
> > 
> > Yes, you are right. I logged in in gerrit with GMX email account,
> > but the commit message is using my secondary email account.
> > 
> > Can the plugin check be extended to verify all allowed email accounts?
> 
> I am not convinced we should all users to modify a contribution. 
> 
> I would prefer to keep this functionality with committers and the author.

@Wayne, do you see any problems/concerns with allowing any users to rebase any public Gerrit patch?
Comment 8 David Ostrovsky CLA 2021-01-12 10:08:58 EST
(In reply to Christopher Guindon from comment #6)
> (In reply to David Ostrovsky from comment #5)
> > (In reply to Martin Lowe from comment #4)
> > > (In reply to David Ostrovsky from comment #0)
> > > > I'm trying to rebase my change: [1] on Gerrit UI and getting this error:
> > [...]
> > > Can you confirm that if you login with your GMX email address this does not
> > > occur?
> > 
> > Yes, you are right. I logged in in gerrit with GMX email account,
> > but the commit message is using my secondary email account.
> > 
> > Can the plugin check be extended to verify all allowed email accounts?
> 
> I am not convinced we should all users to modify a contribution.

That's not what I am saying.

This was my own change. The only issue is that my logged in email
is different from my preferred email that I used for committing.

The ECA plugin could fetch all emails for the current user and perform extended check, if one from emails is matching to detect if the currently logged in user is the change owner. If this is the case, then rebase from gerrit UI should be possible.
Comment 9 Martin Lowe CLA 2021-01-12 10:18:20 EST
(In reply to David Ostrovsky from comment #8)
> (In reply to Christopher Guindon from comment #6)
> > (In reply to David Ostrovsky from comment #5)
> > > (In reply to Martin Lowe from comment #4)
> > > > (In reply to David Ostrovsky from comment #0)
> > > > > I'm trying to rebase my change: [1] on Gerrit UI and getting this error:
> > > [...]
> > > > Can you confirm that if you login with your GMX email address this does not
> > > > occur?
> > > 
> > > Yes, you are right. I logged in in gerrit with GMX email account,
> > > but the commit message is using my secondary email account.
> > > 
> > > Can the plugin check be extended to verify all allowed email accounts?
> > 
> > I am not convinced we should all users to modify a contribution.
> 
> That's not what I am saying.
> 
> This was my own change. The only issue is that my logged in email
> is different from my preferred email that I used for committing.
> 
> The ECA plugin could fetch all emails for the current user and perform
> extended check, if one from emails is matching to detect if the currently
> logged in user is the change owner. If this is the case, then rebase from
> gerrit UI should be possible.

The issue here isn't the separate email accounts, but that it is separate legal entities/accounts within the system. There is no way to link accounts in such a way currently.
Comment 10 Matthias Sohn CLA 2021-01-12 12:05:51 EST
(In reply to Martin Lowe from comment #9)
> (In reply to David Ostrovsky from comment #8)
> > (In reply to Christopher Guindon from comment #6)
> > > (In reply to David Ostrovsky from comment #5)
> > > > (In reply to Martin Lowe from comment #4)
> > > > > (In reply to David Ostrovsky from comment #0)
> > > > > > I'm trying to rebase my change: [1] on Gerrit UI and getting this error:
> > > > [...]
> > > > > Can you confirm that if you login with your GMX email address this does not
> > > > > occur?
> > > > 
> > > > Yes, you are right. I logged in in gerrit with GMX email account,
> > > > but the commit message is using my secondary email account.
> > > > 
> > > > Can the plugin check be extended to verify all allowed email accounts?
> > > 
> > > I am not convinced we should all users to modify a contribution.
> > 
> > That's not what I am saying.
> > 
> > This was my own change. The only issue is that my logged in email
> > is different from my preferred email that I used for committing.
> > 
> > The ECA plugin could fetch all emails for the current user and perform
> > extended check, if one from emails is matching to detect if the currently
> > logged in user is the change owner. If this is the case, then rebase from
> > gerrit UI should be possible.
> 
> The issue here isn't the separate email accounts, but that it is separate
> legal entities/accounts within the system. There is no way to link accounts
> in such a way currently.

If a user has registered multiple email addresses for an account using [1]
I think you can get these email addresses of a user using the Gerrit REST API [2].

[1] https://git.eclipse.org/r/settings/#EmailAddresses
[2] https://git.eclipse.org/r/Documentation/rest-api-accounts.html#list-account-emails
Comment 11 Martin Lowe CLA 2021-01-12 12:11:15 EST
(In reply to Matthias Sohn from comment #10)
> (In reply to Martin Lowe from comment #9)
> > (In reply to David Ostrovsky from comment #8)
> > > (In reply to Christopher Guindon from comment #6)
> > > > (In reply to David Ostrovsky from comment #5)
> > > > > (In reply to Martin Lowe from comment #4)
> > > > > > (In reply to David Ostrovsky from comment #0)
> > > > > > > I'm trying to rebase my change: [1] on Gerrit UI and getting this error:
> > > > > [...]
> > > > > > Can you confirm that if you login with your GMX email address this does not
> > > > > > occur?
> > > > > 
> > > > > Yes, you are right. I logged in in gerrit with GMX email account,
> > > > > but the commit message is using my secondary email account.
> > > > > 
> > > > > Can the plugin check be extended to verify all allowed email accounts?
> > > > 
> > > > I am not convinced we should all users to modify a contribution.
> > > 
> > > That's not what I am saying.
> > > 
> > > This was my own change. The only issue is that my logged in email
> > > is different from my preferred email that I used for committing.
> > > 
> > > The ECA plugin could fetch all emails for the current user and perform
> > > extended check, if one from emails is matching to detect if the currently
> > > logged in user is the change owner. If this is the case, then rebase from
> > > gerrit UI should be possible.
> > 
> > The issue here isn't the separate email accounts, but that it is separate
> > legal entities/accounts within the system. There is no way to link accounts
> > in such a way currently.
> 
> If a user has registered multiple email addresses for an account using [1]
> I think you can get these email addresses of a user using the Gerrit REST
> API [2].
> 
> [1] https://git.eclipse.org/r/settings/#EmailAddresses
> [2]
> https://git.eclipse.org/r/Documentation/rest-api-accounts.html#list-account-
> emails

While it's true that you would be able to add additional emails to your Gerrit account, I don't believe those are linked explicitly to the Eclipse accounts. The issue here isn't the email that we are seeing from Gerrit, more that David has multiple Eclipse accounts under each email. 

When looking up his account via email to get the associated Eclipse account (which is how the ECA service currently looks up users), it found 2 different accounts which is the reason that the commit was flagged.
Comment 12 Matthias Sohn CLA 2021-01-12 12:15:40 EST
ok, that's a different case and seems impossible to support if your backend doesn't know these accounts are for the same person
Comment 13 Martin Lowe CLA 2021-01-12 12:22:54 EST
(In reply to Matthias Sohn from comment #12)
> ok, that's a different case and seems impossible to support if your backend
> doesn't know these accounts are for the same person

Exactly! It's a good point to bring up though and it sparked a chat with Chris about it, so it's not for nothing ;) 

I'm going to close this as the main issue with this bug has been resolved. While this would be an interesting case to support, we aren't currently able to with the system.