Can we drop the Gerrit Change-IDs requirement? #324
Replies: 3 comments 3 replies
-
@abmerop : I thought you had said previously on Github (can't seem to find where) that this change would break Gerrit compatibility on your end at AMD. Am I misremembering? |
Beta Was this translation helpful? Give feedback.
-
@giactra and @rjc-arch, you have probably done more cherry-picks through gerrit recently. What are your thoughts on this? In general, my experience is that Gerrit gets more upset if you have multiple commits with the same Change-ID or commits with multiple Change-IDs. Not having a change ID makes tracking of logical changes (e.g., for backporting) a bit tricky since the maintainer tooling in the main repo uses change IDs to track changes. |
Beta Was this translation helpful? Give feedback.
-
Hi Bobby. I appreciate the difficulties you have mentioned above. From my point of view, more than aiding the continued use of Gerrit (which is also of benefit), we have found the Change-IDs useful for tracking patches as they are ported between branches. While porting changes between branches often requires modifying the code, and will inevitably result in a different commit hash, the Change-ID can be used to track a 'logical change' between branches. Some existing tooling already uses this feature; for example For the purpose of tracking 'logical changes' it isn't a big problem to have no Change-ID in merge commits, or (to a lesser extent) to have multiple Change-IDs in a squash commit (although the existing tooling will need to be updated to cope with these cases). For these reasons I would prefer us to keep the Change-ID requirement if possible. However I accept the problems you mentioned above, as well as @andysan's point about Gerrit not liking multiple Change-IDs in a single commit. |
Beta Was this translation helpful? Give feedback.
-
When migrating from Gerrit to Github we felt we needed to keep Change-IDs in commit messages to keep our mainline gem5 Github repo compatible with those who use Gerrit to develop gem5. However, I must confess we probably made things worse for Gerrit users in trying to keep this going. In enforcing commit messages to contain change IDs we accidentally introduced the following problems:
(See discussion #261 for a discussion about GitHub Merge policy).
In addition, now that we're being a bit more careful on preventing (2.) by removing Change-IDs from PR descriptions manually, the merge commit does not have a Change-ID, so our policy of every commit in gem5 doesn't hold.
On our end keeping Gerrit IDs in commits is causing the following pain-points:
Squash Merges
, see discussion Open discussion about gem5's PR Merge Policy: Should we use `Merge` `Squash` or `Rebase`? #261 for more on this).My question to the community is, can we drop this requirement? I have created PR #315 to remove it. For those that use Gerrit I believe the following is true: Commits made through GitHub without a change-id are fine and don't make a Gerrit system unworkable. It just means that you must merge the GitHub repo directly with the repo Gerrit uses and not via the Gerrit system (which is fine because the gem5 GitHub patches have already been reviewed). On the flip-side, commits may still contain Change-IDs and they can be enforced for those who contribute via a Gerrit systems. If these patches are then contributed to the GitHub gem5 repo, GitHub will not complain.
Beta Was this translation helpful? Give feedback.
All reactions