Automatic 'git bisect' for push with multiple commits when CI fails
Alice pushes a new branch with 10 commits. Currently, CI is only run for the last commit. The builds/tests fail. Assuming the problem is not trivial and can not be pinpointed by the compiler/testing suite directly, Alice will now have to start a lengthy manual process to find out what part of her work broke the tests. Quite possible that she chooses git bisect
(or a similar, fully manual process) for this, knowing that the point/commit she based her new branch on was green.
It may or may not be possible to run the testing suite locally, but either way, she spends several hours until she finds out that a small typo in commit 9/10 broke everything. GitLab CI could easily have found this out for her, if either
- CI had been run for all 10 commits, or
- CI had been run for more commits (employing a
git bisect
-based strategy) to find out when and where things went south for the first time.
This also related to @sytses's recent blog post ("The 11 Rules of GitLab Flow") and one comment to that post.
cc @grzesiek