alert-psychiatrist-14102
12/04/2023, 10:06 AMpants run my_target
, and then created the AMI with the relevant caches. However, when we create a new machine and run the same pants run my_target
it still spends a lot of time on building the requirements.
Anyone knows how to improve this? (we have huge requirements, and this stage can take up to 20 mins)gorgeous-winter-99296
12/04/2023, 11:51 AM-ldebug
and seeing the exact Process it runs, and what is captured by that.alert-psychiatrist-14102
12/04/2023, 2:18 PM-ldebug
, we know that what takes time is creating the pex with multiple (48 in our case) pip requirements. Anything else we should look for in the logs?gorgeous-winter-99296
12/04/2023, 2:27 PMpython_source
will build dependencies separately from the local code, whereas the pex_binary
does it in a single step and thus any code change invalidates the whole build.
When you run with -ldebug
it'll say what process it spawns, the arguments, and digests. If those change, it invalidates the cache as well. So if those are constant but the cache isn't used it's a bug, and if they change, it's an expectation mismatch.alert-psychiatrist-14102
12/04/2023, 3:55 PMpython_source
.
Re cache invalidation - did not notice changes yet. Are there env vars that would also invalidate the cache? e.g. PATH?gorgeous-winter-99296
12/04/2023, 4:33 PM