Hello, when I fetch Gerrit repository I get 'remote: error: internal error'. In gerrit logs I found the following errors:[ReceiveCommits-8[receive-commits]-for-SSH git-receive-pack /my/repository (user)] ERROR com.google.gerrit.server.git.receive.ReceiveCommits : ReceiveCommits failed due to NullPointerException java.lang.NullPointerException: change 123456: change not processed by merge strategy at java.base/java.util.Objects.requireNonNull(Objects.java:259) at com.google.gerrit.server.submit.SubmitStrategyListener.checkCommitStatus(SubmitStrategyListener.java:107) at com.google.gerrit.server.submit.SubmitStrategyListener.afterUpdateRepos(SubmitStrategyListener.java:57) at com.google.gerrit.server.update.BatchUpdates.notifyAfterUpdateRepo(BatchUpdates.java:155) at com.google.gerrit.server.update.BatchUpdates.execute(BatchUpdates.java:110) at com.google.gerrit.server.update.SubmissionExecutor.execute(SubmissionExecutor.java:66) at com.google.gerrit.server.submit.MergeOp.integrateIntoHistory(MergeOp.java:934) at com.google.gerrit.server.submit.MergeOp.lambda$merge$2(MergeOp.java:760) at com.google.gerrit.server.update.RetryableChangeAction.lambda$new$0(RetryableChangeAction.java:48) at com.google.gerrit.server.update.RetryableAction.lambda$new$0(RetryableAction.java:94) at com.github.rholder.retry.AttemptTimeLimiters$NoAttemptTimeLimit.call(AttemptTimeLimiters.java:78) at com.github.rholder.retry.Retryer.call(Retryer.java:160) at com.google.gerrit.server.update.RetryHelper.executeWithTimeoutCount(RetryHelper.java:598) at com.google.gerrit.server.update.RetryHelper.execute(RetryHelper.java:541) at com.google.gerrit.server.update.RetryableAction.call(RetryableAction.java:192) at com.google.gerrit.server.update.RetryableChangeAction.call(RetryableChangeAction.java:84) at com.google.gerrit.server.submit.MergeOp.merge(MergeOp.java:769) at com.google.gerrit.server.git.receive.ReceiveCommits.submit(ReceiveCommits.java:3144) at com.google.gerrit.server.git.receive.ReceiveCommits.insertChangesAndPatchSets(ReceiveCommits.java:1199) at com.google.gerrit.server.git.receive.ReceiveCommits.processCommandsUnsafe(ReceiveCommits.java:921) at com.google.gerrit.server.git.receive.ReceiveCommits.processCommands(ReceiveCommits.java:730) at com.google.gerrit.server.git.receive.AsyncReceiveCommits.lambda$preReceive$2(AsyncReceiveCommits.java:386) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572) at com.google.gerrit.server.util.RequestScopePropagator.lambda$cleanup$1(RequestScopePropagator.java:187) at com.google.gerrit.server.util.RequestScopePropagator.lambda$context$0(RequestScopePropagator.java:174) at com.google.gerrit.server.util.ThreadLocalRequestScopePropagator.lambda$wrapImpl$0(ThreadLocalRequestScopePropagator.java:47) at com.google.gerrit.server.util.RequestScopePropagator$1.call(RequestScopePropagator.java:85) at com.google.gerrit.server.util.RequestScopePropagator$2.run(RequestScopePropagator.java:116) at com.google.gerrit.server.logging.LoggingContextAwareRunnable.run(LoggingContextAwareRunnable.java:113) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317) at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) at com.google.gerrit.server.git.WorkQueue$Task.run(WorkQueue.java:912) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) at java.base/java.lang.Thread.run(Thread.java:1583)
--
--
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.
To view this discussion visit https://groups.google.com/d/msgid/repo-discuss/440a0a5b-90e7-40d9-8efe-9bef962a4d1bn%40googlegroups.com.
On 21 Mar 2025, at 08:19, Rodion <rodvla...@gmail.com> wrote:Sorry for confusing, I was pushing to Gerrit repository.I'm using Gerrit v3.11.1
To view this discussion visit https://groups.google.com/d/msgid/repo-discuss/f5a43775-bfa9-4837-8a30-f30f366dec1fn%40googlegroups.com.
On 21 Mar 2025, at 08:19, Rodion <rodvla...@gmail.com> wrote:Sorry for confusing, I was pushing to Gerrit repository.I'm using Gerrit v3.11.1It must be a different issue then.
I believe what happens is that your push is silently trying to merge a series of changes and some of them are already merged (or reachable) in another branch.
Good day,пятница, 21 марта 2025 г. в 09:28:41 UTC+1, Luca Milanesio:On 21 Mar 2025, at 08:19, Rodion <rodvla...@gmail.com> wrote:Sorry for confusing, I was pushing to Gerrit repository.I'm using Gerrit v3.11.1It must be a different issue then.I believe what happens is that your push is silently trying to merge a series of changes and some of them are already merged (or reachable) in another branch.We have no indication of this change being present in any of other branches. Change ID and hash are both unique and pointing to only one pull request for every change in relation chain
Manual merge works without issues, why silent merge has different behaviour? I don't see anything about in docs
What could be a reason then, and how can we get to the root of it?
On Friday, March 28, 2025 at 1:00:22 PM UTC+1 Dmytro Rodionov wrote:Good day,пятница, 21 марта 2025 г. в 09:28:41 UTC+1, Luca Milanesio:On 21 Mar 2025, at 08:19, Rodion <rodvla...@gmail.com> wrote:Sorry for confusing, I was pushing to Gerrit repository.I'm using Gerrit v3.11.1It must be a different issue then.I believe what happens is that your push is silently trying to merge a series of changes and some of them are already merged (or reachable) in another branch.We have no indication of this change being present in any of other branches. Change ID and hash are both unique and pointing to only one pull request for every change in relation chain
Manual merge works without issues, why silent merge has different behaviour? I don't see anything about in docs
What could be a reason then, and how can we get to the root of it?What is the submit-strategy of the repository?
It sounds a lot like Issue 40014054 that I don't think is solved.
On 28 Mar 2025, at 12:35, Dmytro Rodionov <smpli...@gmail.com> wrote:пятница, 28 марта 2025 г. в 13:26:22 UTC+1, Sven Selberg:On Friday, March 28, 2025 at 1:00:22 PM UTC+1 Dmytro Rodionov wrote:Good day,пятница, 21 марта 2025 г. в 09:28:41 UTC+1, Luca Milanesio:On 21 Mar 2025, at 08:19, Rodion <rodvla...@gmail.com> wrote:Sorry for confusing, I was pushing to Gerrit repository.I'm using Gerrit v3.11.1It must be a different issue then.I believe what happens is that your push is silently trying to merge a series of changes and some of them are already merged (or reachable) in another branch.We have no indication of this change being present in any of other branches. Change ID and hash are both unique and pointing to only one pull request for every change in relation chain
Manual merge works without issues, why silent merge has different behaviour? I don't see anything about in docs
What could be a reason then, and how can we get to the root of it?What is the submit-strategy of the repository?
It sounds a lot like Issue 40014054 that I don't think is solved.We use the default strategy "Merge If Necessary", not the "Fast Forward Only" from the issue
To view this discussion visit https://groups.google.com/d/msgid/repo-discuss/b4953c98-5cca-4dda-84c1-cba3ce225bf4n%40googlegroups.com.
On 28 Mar 2025, at 12:35, Dmytro Rodionov <smpli...@gmail.com> wrote:пятница, 28 марта 2025 г. в 13:26:22 UTC+1, Sven Selberg:On Friday, March 28, 2025 at 1:00:22 PM UTC+1 Dmytro Rodionov wrote:Good day,пятница, 21 марта 2025 г. в 09:28:41 UTC+1, Luca Milanesio:On 21 Mar 2025, at 08:19, Rodion <rodvla...@gmail.com> wrote:Sorry for confusing, I was pushing to Gerrit repository.I'm using Gerrit v3.11.1It must be a different issue then.I believe what happens is that your push is silently trying to merge a series of changes and some of them are already merged (or reachable) in another branch.We have no indication of this change being present in any of other branches. Change ID and hash are both unique and pointing to only one pull request for every change in relation chain
Manual merge works without issues, why silent merge has different behaviour? I don't see anything about in docs
What could be a reason then, and how can we get to the root of it?What is the submit-strategy of the repository?
It sounds a lot like Issue 40014054 that I don't think is solved.We use the default strategy "Merge If Necessary", not the "Fast Forward Only" from the issueI could be a new issue then.
On 28 Mar 2025, at 13:39, Dmytro Rodionov <smpli...@gmail.com> wrote:пятница, 28 марта 2025 г. в 14:03:25 UTC+1, Luca Milanesio:On 28 Mar 2025, at 12:35, Dmytro Rodionov <smpli...@gmail.com> wrote:пятница, 28 марта 2025 г. в 13:26:22 UTC+1, Sven Selberg:On Friday, March 28, 2025 at 1:00:22 PM UTC+1 Dmytro Rodionov wrote:Good day,пятница, 21 марта 2025 г. в 09:28:41 UTC+1, Luca Milanesio:On 21 Mar 2025, at 08:19, Rodion <rodvla...@gmail.com> wrote:Sorry for confusing, I was pushing to Gerrit repository.I'm using Gerrit v3.11.1It must be a different issue then.I believe what happens is that your push is silently trying to merge a series of changes and some of them are already merged (or reachable) in another branch.We have no indication of this change being present in any of other branches. Change ID and hash are both unique and pointing to only one pull request for every change in relation chain
Manual merge works without issues, why silent merge has different behaviour? I don't see anything about in docs
What could be a reason then, and how can we get to the root of it?What is the submit-strategy of the repository?
It sounds a lot like Issue 40014054 that I don't think is solved.We use the default strategy "Merge If Necessary", not the "Fast Forward Only" from the issueI could be a new issue then.It could be. But we don't know why this happens and therefore unable to find steps to reproduce, in order to create a proper issue.
To view this discussion visit https://groups.google.com/d/msgid/repo-discuss/9d1d0cdf-4a1b-496c-bded-33913c3601efn%40googlegroups.com.
I will send you the answer as soon as possible.
To view this discussion visit https://groups.google.com/d/msgid/repo-discuss/7A41A4D6-C960-4500-84A4-607B195E26F5%40gmail.com.
Nice to meet you, guys!
Finally, I was able to reproduce the issue.
Here are the steps, 100% reproducible on demo repository.
Its submit strategy is "Rebase if necessary".
git fetch origin master
git checkout origin/master -b demo_master
echo "common_rev" > demo_common_file && git add demo_common_file && git commit -m "common_rev"
git push origin HEAD:refs/for/master
# merge change via gerrit web interface
echo "master_rev" > demo_master_file && git add demo_master_file && git commit -m "master_rev"
git push origin HEAD:refs/for/master
# merge change via gerrit web interface
git checkout HEAD~1 -b demo_external
echo "rev_to_merge_1" > demo_external_file && git add demo_external_file && git commit -m "external_rev_1"
echo "rev_to_merge_2" >> demo_external_file && git add demo_external_file && git commit -m "external_rev_2 (dependent on external_rev_1)"
git checkout demo_master
git merge --ff -m "merge external into master" demo_external
> Using merges with rebases is tricky on the commandline already, so this workflow is incompatible with the selected commit strategy.
This sounds true and I agree that in general this can be tricky.
But, look for this particular case (syncing & merging code between our and partner remotes):- git checkout origin/master
- git merge external/external_branch
- git push origin/master
- git push external/external_branch
In this case push is always fast-forward and it should NOT fail.
This was the behaviour on 3.9.2 and seems it is broken on 3.11.1
Regarding chosen submit strategy:
This repository is used both by developers and automatic code sync.
For developers "rebase if necessary" is more comfortable (does not require additional manual actions compared with "fast forward only").
For code sync "fast forward only" would be the right choice. But for the sake of developers' comfort, actual submit type is "fast forward only".
It would be great if we could override submit type per submission to use "fast forward only" explicitly in code sync tool.
What we do now, is pulling-then-pushing, so actually achieving fast-forward in 99% cases.