Been looking <https://www.pantsbuild.org/docs/usin...
# general
v
Been looking https://www.pantsbuild.org/docs/using-pants-in-ci recently, particularly the "GitLab CI: disable shallow clones or fetch main branch" section. • First, the code referenced there did not work out-of-the-box for me, which is fine. My company's custom shallow clone strategy in CI goes only to depth=5 which is sometimes not enough coverage for feature branches that have a long, unmerged commit history to them. So, I had to iteratively deepen with git fetch and test if git could find a merge-base. It's a bit gross. • Second, there are two other options beyond full checkout and shallow clone: treeless git clones and blobless git clones. See here for blog post. Both support arbitrary git merge-base but they can also significantly reduce checkout times though not as much as the shallow clone. My testing with
pants --changed-since
seems to produce identical results in the treeless and blobless varieties.
āž• 1
b
Those lighter-weight clones sound like good ideas, to reference in https://github.com/pantsbuild/pants/blob/main/docs/markdown/Using%20Pants/using-pants-in-ci.md Do you have time to either open an issue or file a PR?
v
Yes, happy to at least open an issue
šŸ‘ 1
b
thank you!