-
Notifications
You must be signed in to change notification settings - Fork 239
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
Check of merge commits in PR #1116
Comments
A new Issue was created by @fabiocos Fabio Cossutti. @davidlange6, @Dr15Jones, @smuzaffar, @fabiocos, @kpedro88 can you please review it and eventually sign/assign? Thanks. cms-bot commands are listed here |
Several years ago I added the "...with cms-merge-topic" in the merge commit message created when using It seems here you're trying to look for duplicate merges of PRs already merged in master? |
@kpedro88 yes, this looks to be the really dangerous case... |
The recent update by @smuzaffar to the merge tests allows to monitor in the PR checks which other PRs are added on top of the tested one, separating from other merge commits inside the PR itself. This is very helpful to interpret the comparison results, but I guess this is not telling us whether the original PR has some pathological merge inside it. |
the test can anyway be done offline. |
cms-bot is checking and listing the merge commits appearing in a test of a PR. The use of cms-merge-topic in the preparation of PRs is clearly discouraged in our documentation https://cms-sw.github.io/tutorial-resolve-conflicts.html , but in practice merge commits are often found in the PRs, both as merge of branches (e.g. master to update the PR), or even using cms-merge-topic. I guess that developers find them as simpler to manage than rebasing.
The use of merge is not necessarily jeopardizing the history, and is often accepted by the reviewers, see as a relevant recent example cms-sw/cmssw#22594 (comment) . Anyway merging is potentially dangerous, and allowing different kind of merge commits may help in missing the dangerous ones, see for instance a recent example in #26201 (luckily with limited consequences).
I see two drawbacks with the bot procedure to check merge commits:
the merge is done on top of the HEAD of the branch, but the search of merge commits looks done staring with the IB tag (according to my understanding of https://github.com/cms-sw/cms-bot/blob/master/run-pr-tests#L245 ). This means that the check could list merges coming from other PRs already merged. This is a reason why I try to accumulate PRs to be merged during the day and merge them altogether close to the IB deadline, so as to minimize the "pollution" of all tests;
the test simply searches for any merge commits. But as most of them are in practice not a real problem, and are normally accepted, the test is not providing really useful information to discriminate potentially dangerous additions.
In order to try to isolate the really dangerous merge commits I have tried to implement what I believe could be the check procedure in the following utility:
I have started to use it in my private tests so as to exercise it.
It would be good whether people may cross check the idea behind it, so as in case we may update the test in the bot to make it more effective.
@slava77 @perrotta @Dr15Jones @kpedro88 @davidlange6
The text was updated successfully, but these errors were encountered: