Hi there, how can make Pants run faster in the clo...
# general
c
Hi there, how can make Pants run faster in the cloud? I'm using Pants to run my CI/CD pipeline. Using Google CloudBuild, I'm basically running pants
test
,
lint
,
check
, and
publish
commands as separate steps of a CloudBuild pipeline. When I run the same steps locally, they execute in a 3-5 seconds, thanks to some clever caching I assume. But on the cloud, it can easily take more than 10 minutes. I noticed from the logs that the most time is spent on Pants overhead rather then the actions of linting or testing themselves. For instance, pytest takes 15s to run the tests, but the entire
pants test
command needs 7 minutes to build the requirements.pex files etc. I'm wondering how can I make it faster: • Is it possible to run e.g. testing and linting in parallel? I cannot make it work, I'm getting the same error as the one discussed here • Is there anything I can do other than parallelization to accelerate individual pants commands, e.g. via caching?
p
h
You definitely want to look into remote caching. Your cloud builds run clean every time, so they have no cached state to lean on.
c
Thanks! I actually did take a look at it. Do you know of any REAPI server that's easily available on GCP?