"forge committer" required when pushing a change on top of an unsubmitted merge commit

47 views
Skip to first unread message

Matthew Webber

unread,
Jul 3, 2018, 6:40:11 AM7/3/18
to Repo and Gerrit Discussion
This is Gerrit 2.15.2. We're hitting a permissions problem that I think (but am not sure) might be a change of behaviour in 2.15.

Here's the sequence:
  1. A developer pushes (to refs/for/master) a merge commit that merges one change from another branch. The single change that is being merged has a different author/committer. Gerrit is happy.
  2. The developer then locally commits a new change, with the merge commit as the parent, and pushes that new commit to Gerrit.
  3. This new push is rejected with:
    remote: ERROR:  In commit acbdefg123456789
    remote
    : ERROR:  committer email address name@example.com
    remote
    : ERROR:  does not match your user account and you have no 'forge committer' permission.
    The commit referred to is the commit that was being merged in from the branch.
  4. The Gerrit error log merely says:
    WARN  com.google.gerrit.server.git.receive.ReceiveCommits : [gda/gda-core-1530609490698-3cf69ea2]Skipping change updates on <reponame> because ref update failed: REJECTED_OTHER_REASON invalid committer
  5. Once the merge commit has been submitted, then the push works.
I think I see what's going on here, and it doesn't seem correct to me. I would prefer not to grant the forge committer permission. When the top commit that I push is a merge commit, Gerrit can handle that correctly, but when I push a series of changes which includes a merge commit that is not the top commit, I hit this problem. Is this a Gerrit bug/limitation?

Thanks
Matthew


Saša Živkov

unread,
Jul 3, 2018, 6:53:42 AM7/3/18
to Matthew Webber, Repo and Gerrit Discussion
What is the value of the "Create a new change for every commit not in the target branch" option on that repository?


Thanks
Matthew


--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Matthew Webber

unread,
Jul 3, 2018, 7:03:49 AM7/3/18
to Repo and Gerrit Discussion
On Tuesday, 3 July 2018 11:53:42 UTC+1, zivkov wrote:
What is the value of the "Create a new change for every commit not in the target branch" option on that repository?

It's set to TRUE.
Now I'm wondering why we set that - the value in most of our repositories is "FALSE (inherit)".
 

Saša Živkov

unread,
Jul 3, 2018, 8:18:56 AM7/3/18
to Matthew Webber, Repo and Gerrit Discussion
On Tue, Jul 3, 2018 at 1:03 PM Matthew Webber <mat...@unsolvable.org> wrote:
On Tuesday, 3 July 2018 11:53:42 UTC+1, zivkov wrote:
What is the value of the "Create a new change for every commit not in the target branch" option on that repository?

It's set to TRUE.
Now I'm wondering why we set that

Unless you know exactly what you are doing, keep the value of this option to FALSE.
 
- the value in most of our repositories is "FALSE (inherit)". 

This is Gerrit's default behaviour. When a commit is uploaded for review then Gerrit will create
a new open change for every commit reachable form the pushed commit which is not already
included in any branch or tag.

When set to TRUE, Gerrit will create a new change for every commit reachable from the pushed
commit and not included in the target branch. This explains the effect you see.

Matthew Webber

unread,
Jul 3, 2018, 9:13:47 AM7/3/18
to Repo and Gerrit Discussion
On Tuesday, 3 July 2018 13:18:56 UTC+1, zivkov wrote:
Unless you know exactly what you are doing, keep the value of this option to FALSE

Thanks for the explanation; that all makes sense. I've checked the setting in all our projects and fixed the single case that was wrong. 
Reply all
Reply to author
Forward
0 new messages