We are observing something in Gerrit that is very unusual. We are using Gerrit version 2.1.8
When changes are pushed with a pre-filled Change-Id, Gerrit usually uses that Change-Id and does not generate a new one.
So, when a new change is pushed, the change-ids in the commit message and Gerrit's change-id match.
Recently, we have observed a lot of changes being created and Gerrit simply ignoring the pre-generated Change-Id line and creating a new one.
The first problem with this is that the id on the commit message does not match Gerrit's.
The commit had one pre-generated Change-Id, but Gerrit has generated a different one. The result of this new change-id hash is the second (and most troubling) issue that we are facing: Gerrit added the new Change-Id to the commit at Submit time (we are using cherry-pick as the submit type). See the example below. (confidential data has been masked)
This is a real commit that has the original Change-Id that was pre-generated by the user, and the second line that was added by Gerrit.
The big problem with this thing is that Gerrit itself won't accept a new push with multiple commit-ids in the commit message (and I remember it used to accept it in previous versions). So, when we want to cherry-pick and propagate that integrated commit to another branch, Gerrit won't let us push it.
I know Gerrit, on version 2.1.8, not accepting the multiple change-ids in the commit message is a known issue (or feature ??? -- sigh), but what we are trying to understand here is why it's not using the pre-generated Change-Id to create a new change, and also why is it generating multiple Change-Id commits itself if it won't accept the same commits later?
I searched Gerrit and there was no existing change that matched the user's Change-Id.
Can someone help me understand what's going on?
Thanks,
Luciano.