by basicallydan on 12/4/20, 7:53 PM with 25 comments
by orf on 12/4/20, 10:35 PM
This is surprisingly difficult to get right, especially with projects with lots of concurrent changes. Gitlab merge trains[1] really help here.
1. https://docs.gitlab.com/ee/ci/merge_request_pipelines/pipeli...
by kiallmacinnes on 12/5/20, 9:55 AM
Master/Main changed between the tests running for that PR, and it merging. Why should those test results be considered a useful indicator for what happens after the PR merges anymore?
GitHub does have a setting you can enable to help with this, essentially, when any PR merges, it forces the developer to rebase any open PRs. A huge waste of effort, so nobody turns it in.
There are far better systems out there, e.g. zuul-ci.org which was designed to handle this exact problem at scale. Others have mentioned GitLab merge trains, though I've never used them - so hard to tell if they really solve this :)
by analogj on 12/5/20, 8:03 AM
git checkout --force refs/remotes/pull/119/merge
They generate it async behind the scenes, so it may not be immediately available after your PR is opened, and changes to master may be delayed.
by iab on 12/4/20, 8:15 PM
by rubatuga on 12/5/20, 6:01 PM
by choeger on 12/5/20, 10:55 AM
But that brings a choke point into your workflow:
* Change A developed and good for master
* Change B developed and good for master
* Change A merged into master
* Change B not good for master any more, gets pushed back
* Change C developed and good for master
* ...
In principle, a change can be put back forever, depending on your practical situation.
by timzaman on 12/5/20, 10:24 AM
by ianlevesque on 12/5/20, 2:08 AM