-
-
Notifications
You must be signed in to change notification settings - Fork 958
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed push on repository to a Gerrit repo after squashing commits #6414
Comments
how does Gerrit expect the Change-Ids in squashed commits to be handled? |
There should be just one Change-Id in the footer. There can be multiple Change-Ids in the body, that's not an issue, but not really needed in this case. Gerrit tracks changes using Change-Ids (similar to how GitHub tracks PRs using branches), and so you need a unique Change-Id per a change you upload to gerrit. If this just kept the first Change-Id, that would work, since all the other commit Change-Ids aren't really useful here - they were internal weblate commits which got squashed, so they don't mean anything now. Why first Change-Id? So that when there's one more commit on top which gets squashed again, it would update the existing change on gerrit. Then whenever it gets merged into the upstream git repo it'd start over. |
I tried to set a custom commit message in the squash addon, a simple one-liner, but that didn't help either. Example commit: https://gitlab.com/CalyxOS/weblate/l10n_test/-/commit/08a0fe1822c15fd35f53b0e827b69d31cd71b53a (this is a projtect we use to test the weblate workflow) |
It might the "Append trailers to squashed commit message" that gets all the Change-Ids. If I disable that option, the commit looks like: https://gitlab.com/CalyxOS/weblate/l10n_test/-/commit/45271dac02379cc8a622f348b15d6427680af138 Line 88 in 9797fd5
https://www.git-scm.com/docs/git-log#Documentation/git-log.txt-emtrailersoptionsem |
Thank you for your report; the issue you have reported has just been fixed.
|
Is this deployed on hosted.weblate.org yet? I ran into this issue again with a new component I just setup, https://hosted.weblate.org/projects/calyxos/calyxosdotorg/#repository (still setting it up fully/properly) Commit: https://gitlab.com/CalyxOS/weblate/calyxosdotorg/-/commit/05e7db153e18bb165ab7e7a5c36750f28b91b351 (this is a mirror of hosted.weblate.org git repository) - I can see two Change-Ids here. One commit did make it to gerrit, 4855: Import translations from Weblate | https://review.calyxos.org/c/CalyxOS/calyxos.org/+/4855 |
I've deployed it now. |
Weblate is unable to push changes to our gerrit repo after squashing them, due to having multiple Change-Ids in the footer.
Example project: https://hosted.weblate.org/projects/calyxos/platform_packages_apps_contacts/#repository
Offending commit: https://gitlab.com/CalyxOS/weblate/platform_packages_apps_contacts/-/commit/529ee2b197094210f0abd737caf0ef3a95655fa4 (this is a mirror of the weblate git repo)
I already tried
Describe the steps you tried to solve the problem yourself.
If you didn’t try already, try to search there what you wrote above.
To Reproduce the issue
Steps to reproduce the behavior:
Expected behavior
There should just be one Change-Id in the commit message footer / trailer.
There can be more in the body, but Gerrit does not like more than one in the footer.
Error message
Server configuration and status
Weblate installation: weblate.org service
Weblate deploy checks
Additional context
The text was updated successfully, but these errors were encountered: