`ee_compat_check` can fail because it doesn't have the necessary blobs to perform a 3-way merge
Here: https://gitlab.com/zj/gitlab-ce/-/jobs/43595953
we got
error: patch failed: lib/gitlab/git/repository.rb:1120
error: repository lacks the necessary blob to fall back on 3-way merge.
error: lib/gitlab/git/repository.rb: patch does not apply
but when tried to apply the patch locally, it applied cleanly because it could fallback to a 3-way merge since I had the full history of the project:
error: patch failed: lib/gitlab/git/repository.rb:1120
Falling back to three-way merge...
Applied patch to 'lib/gitlab/git/repository.rb' cleanly.
To resolve that, we'd need to fetch the canonical-ee remote deeper but the problem is that we don't know how deep we'd need to fetch...
Thanks @zj for reporting this false-negative.