My commits can't be merged after the affiliation change
Steps to reproduce
Create a new commit like eclipse/oniro-core/oniro!342 (merged) with the changed email address (both Author and Signed-off-by)
Get review, try to merge -> fail
The git CLI is way more verbose. It should include a link and information if the issue is ECA related. It's not idea but it might help us better understand why this is failing.
I just did a test, and realized that our hook will not flag any issues when pushing to a fork.
Total 3 (delta 2), reused 0 (delta 0)
remote: Non-Eclipse project repository detected: ECA validation will be skipped.
remote:
remote: Note that any issues with sign-off or committer access will be flagged upon merging into the main project repository.
We would only get more information if you push your branch to the project repository.
I did notice that your PR is 4 commits behind the target branch. Can you rebase and try merging again? Your commit should be fine. I reviewed your ECA status and everything checks out but I am wondering if the ECA is failing because of an older commit.
We have a little progress today. Not sure what you have enabled, it's now showing an ECA error. It's saying I'm using my personal email which isn't in the commit concerned (verified, both author and sign-off are Linaro's). I've also changed the Commiter email field in the GitLab preferences. No idea where this email comes from now.
@mrybczyn Please ensure that the email address in the commit author field matches with your Eclipse account. That step is important to allow us to link an Eclipse account with an EACA.
We have a little progress today. Not sure what you have enabled, it's now showing an ECA error.
We upgraded Gitlab on Friday. I am wondering if the latest version is now returning more information such as the ECA validation URL when the merge fails.
We don't use the additional email address for validation. The way the validation works is that we take the email address from the git author field in the git log for each particular comment and we validate if that email address is used by an Eclipse account, if so, we validate if they have an ECA on file.
Author: Marta Rybczynska <marta.rybczynska@linaro.org>Date: Wed Oct 12 01:09:52 2022 +0200 README: fix a typo Signed-off-by: Marta Rybczynska <marta.rybczynska@linaro.org>diff --git a/README.md b/README.mdindex 92f8547..d74da51 100644--- a/README.md+++ b/README.md@@ -6,7 +6,7 @@ SPDX-License-Identifier: CC-BY-4.0 # Oniro Project-Welcome to the Oniro\* Project main git reposiotory! Oniro is an Eclipse+Welcome to the Oniro\* Project main git repository! Oniro is an Eclipse Foundation project focused on the development of a distributed open source operating system for consumer devices.
I can't see the Gmail address inside. I've done such a simple one to test the transition.
Can you run git show -s --format='%ce in your branch? It should show you the latest commits committing email address. Checking committer email is still checked as a holdover from legacy support, and we're going to be creating an issue to look at removing this check this Quarter!
Thanks, this is it! I think I used --reset-author here instead of --author for those commits.
However something has changed in the check recently. In the Oniro repo history I find quite many other commits with the Commiter using the Gmail account. And it did pass at that time.
@cguindon there seems to be a general breakage. People can't push to their branches because if that email in the history, apparently. I asked for reports in this ticket
No it doesn't. It seems the error now is launched for any fork including old commits (those with the Gmail address as Commiter). It means that nobody can push any fork. This is critical. @agherzan please confirm
remote: GitLab: Committer 'rybczynska@gmail.com' is not a member of teamTo gitlab.eclipse.org:agherzan/oniro.git ! [remote rejected] ag/drop-nitro-ave -> ag/drop-nitro-ave (pre-receive hook declined)error: failed to push some refs to 'git@gitlab.eclipse.org:agherzan/oniro.git'
And it was due to #1034 (closed). Once disabling the related configuration, this went through. That being said, this is still a problem because there are no commits with the email reported above in the fork. So I suspect something else is also at play here.
Can you give more of the message in terminal? There should be a URL a little higher in the message that provides more data that we can use to look into the errors.
Additionally, are you having this problem with a clean branch or one that you've done work in and pulled changes for? The error you provided above is not one from the EF checks, but from Gitlab itself in one of their security features, which as you mentioned should be disabled. If you get that error now, it could be that it has been somehow reenabled on your fork
Enumerating objects: 2535, done.Counting objects: 100% (1177/1177), done.Delta compression using up to 12 threadsCompressing objects: 100% (780/780), done.Writing objects: 100% (843/843), 141.99 KiB | 5.68 MiB/s, done.Total 843 (delta 497), reused 2 (delta 0)remote: Resolving deltas: 100% (497/497), completed with 191 local objects.remote: GitLab: Committer 'rybczynska@gmail.com' is not a member of teamTo gitlab.eclipse.org:agherzan/oniro.git ! [remote rejected] ag/drop-nitro-ave -> ag/drop-nitro-ave (pre-receive hook declined)error: failed to push some refs to 'git@gitlab.eclipse.org:agherzan/oniro.git'
It is a fork. So the branch I was pushing was a local branch, synced with the parent repository and including new commits on top (classic fork, push and merge setup).
And yes, this is an error generated by GitLab directly but:
This was disabled before so I suspect something (maybe an upgrade) re-enabled it. I am not the only one affected as this was confirmed by other devs too.
I'm yet to find the commit it complains about and you managed to identify.
Sorry for the delay, wanted to get you a command that would just work out of the box for checking. The command I'm passing gives you the abbreviated hash, committer, and author emails for all commits added to the current branch relative to the origin/kirkstone branch. If you based your branch on kirkstone, you won't have to change it.
git show -s --format='Commit: %h, Committer: %ce, Author: %ae' HEAD...origin/kirkstone^{commit}
While this doesn't fix it, it lets us diagnose the current issue at least. Someone on our team looked into your repos and didn't see the flag rechecked for at least your repos and forks. So it may have something flipped somewhere else
I asked for it in that format so I could see both committer and author fields in a concise way to validate the branch. You can see the local stuff but I can't, and I want to be sure before we cross it off! It could be something in your fork was munged by something...there's nothing wrong set in the fork but a rule has reactivated itself even though the UI tells us it's off.
About the configuration in GitLab, I have disabled it in the meanwhile to get myself unblocked so it would/should be disabled now.
So wait, is this still an issue, or is it resolved?
So this is what I got when attempting to recreate:
❯ git push origin HEAD -uEnumerating objects: 42, done.Counting objects: 100% (42/42), done.Delta compression using up to 8 threadsCompressing objects: 100% (19/19), done.Writing objects: 100% (30/30), 7.19 KiB | 3.59 MiB/s, done.Total 30 (delta 18), reused 13 (delta 7), pack-reused 0remote: Non-Eclipse project repository detected: ECA validation will be skipped.remote: remote: Note that any issues with sign off or committer access will be flagged upon merging into the main project repository.remote: remote: To create a merge request for m/1, visit:remote: https://gitlab.eclipse.org/malowe/oniro/-/merge_requests/new?merge_request%5Bsource_branch%5D=m%2F1remote: To gitlab.eclipse.org:malowe/oniro.git * [new branch] HEAD -> m/1branch 'm/1' set up to track 'origin/m/1'.
Sorry for the late reply - I completely missed this one. I think we are good now. I haven't dug more into it due to lack of time but everything seems to work as expected - also confirmed that this is not an issue anymore with other commiters as part of an Oniro PMC-related discussion. Thanks for your support - closing this issue.
Hi, FYI i sorted it out by using the same email that I used to login (it was set by @webmaster IIRC), it looks like that alt emails are not used by gitlab only main one (that should be also set in commit email).
Alternate emails are only used for things like email notifications from the system. Our plugin doesn't even interact with Gitlab itself for validation, only Git! This is a feature in that it works the same for Github and Gerrit as well, so its the same across the board. This means that the biggest impact for this will be how you setup your local Git instance with the user email. There is the smaller use case of using the Gitlab UI, which (I think) pulls your primary address as the committer and author of commits.