When this is done in a PR with branch protections this works out
differently and in my view your concerns are mitigated.
1. There isn't a partial squash operation. All reviewers know that the
final output of the PR is going to 1 commit. Thus there is no confusion
of what or how it is being committed to the target branch.
2. With GitHub branch protections requiring the PR only being merged if
it is up-to-date with the target branch. This means you have to push
the button in github to merge in target and if any conflicts occur the
PR is flagged and can't be completed without user involvement. This
would also give reviewers an opportunity to review the merge commit if
necessary.
3. With GitHub status checks and branch policies correctly configured
the builds are re-run every time the target branch changes. This means
that if you have confidence in your PR gates catching most practical
merge errors (at least the ones the submitter would catch) you have
avoided this issue. This is why the PR builds check every thing in the
tree rather than just the incoming patch.
Again, this ask was not to create a lazy process or lower the quality of
the code tree. If there are legitimate gaps that a squash merge
workflows creates, I am interested in finding solutions. For example,
the DCO requirement would need to be addressed. But we can only start
those conversations if we can get aligned on the idea.
Thanks
Sean
On 5/20/2020 10:05 AM, Laszlo Ersek wrote:
On 05/19/20 23:02, Desimone, Nathaniel L wrote:
Of course, there may be other patch series that would be logical to
squash, especially if the author has not been careful to maintain
bisectability. For example, I think of some patch series went a
little overboard and could have been done in maybe 1-2 patches
instead of 8-10. I would be happy to compromise with you and say that
squashes can be done in circumstances where both the maintainer and
the author agree to it.
Important distinction:
(a) "squashing patches" is a 100% valid operation that some situations
fully justifiedly call for. Maintainers may ask for it, and contributors
may use it with or without being asked, if the situation calls for it.
(b) "squashing patches *on merge*" is intolerable.
The difference is whether there is a final human review for the
*post-squash* state before the merge occurs.
The valid case is when the contributor squashes some patches, resubmits
the review/pull request, the reviewer approves the *complete* work
(after performing another review, which may of course be incremental in
nature), and then the series is merged exactly as it was submitted.
The invalid case (squash on merge) is when the reviewer checks /
approves the series when it still contains incremental fixes as
broken-out patches, then squashes some patches (in the worst case: all
patches into one), and then merges the result. In this (invalid) case,
the complete work, in its final state (in the way it's going to land in
the git history) has not been reviewed by either submitter or reviewer,
incrementally or otherwise. This is why squash on merge is intolerable:
it places a sequence of commits into the git history that has never been
reviewed *verbatim* by either submitter or reviewer. It's a "blind
merge", to make up another term for illustration
Squashing is a 100% valid tool, I use it all the time. Squash-on-merge
is a catastrophic process failure.
Thanks
Laszlo
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#59985): https://edk2.groups.io/g/devel/message/59985
Mute This Topic: https://groups.io/mt/74289183/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-