lemon-finland-60184
07/18/2022, 10:37 PMpants --pants-config-files=pants.ci.toml test :: --test-shard=${TEST_SHARD}
When I try to run tests on just the changed files, Pants seems to take 5-10 minutes building the dependencies for all the tests
• pants --pants-config-files=pants.ci.toml --changed-since=origin/master --changed-dependees=transitive test --test-shard=${TEST_SHARD}
When running in CI, we have pantsd
and watch_filesystem
set to false from guidance in this thread, so I know we're taking some performance hit, but it seems like a really significant hit compared to using just xdist.
I'm not sure what we're doing wrong, but if you have any guidance on how to determine what's causing the long run times, that would be appreciated? Thanks! (cc @cold-soccer-63228)witty-crayon-22786
07/18/2022, 11:02 PMwitty-crayon-22786
07/18/2022, 11:02 PMwitty-crayon-22786
07/18/2022, 11:04 PMhundreds-father-404
07/18/2022, 11:05 PMwitty-crayon-22786
07/18/2022, 11:14 PMtailor
, or did you create BUILD files and targets manually?lemon-finland-60184
07/18/2022, 11:16 PMtailor
and then hand editing any BUILD files that are missing some deps (like fixture files)witty-crayon-22786
07/18/2022, 11:22 PM./pants --no-pantsd dependencies ::
locally and a run of ./pants --no-pantsd --no-local-cache dependencies ::
… the latter will have to run a few thousand tiny processes.lemon-finland-60184
07/18/2022, 11:23 PMwitty-crayon-22786
07/18/2022, 11:24 PMlemon-finland-60184
07/18/2022, 11:25 PMlemon-finland-60184
07/19/2022, 8:23 PM$ ./pants --pants-config-files=pants.ci.toml --changed-since=origin/master --changed-dependees=transitive test --test-shard=${TEST_SHARD}
19:56:01.10 [INFO] Long running tasks:
78.38s Map all targets to their dependees
$ ./pants --pants-config-files=pants.ci.toml --changed-since=origin/master --changed-dependees=transitive test --test-shard=${TEST_SHARD}
20:11:53.26 [INFO] Long running tasks:
73.10s Map all targets to their dependees
20:12:23.48 [INFO] Long running tasks:
103.34s Map all targets to their dependees
20:12:53.81 [INFO] Long running tasks:
133.68s Map all targets to their dependees
witty-crayon-22786
07/19/2022, 8:25 PMa1
, so you should see a small bump there.lemon-finland-60184
07/19/2022, 8:25 PMwitty-crayon-22786
07/19/2022, 8:26 PMpy-spy
profile of one of your --changed
runs, that would be helpful.witty-crayon-22786
07/19/2022, 8:26 PMwitty-crayon-22786
07/19/2022, 8:31 PMlemon-finland-60184
07/19/2022, 8:31 PMwitty-crayon-22786
07/19/2022, 8:32 PMI’m seeing really long test times, on the order of minutes for a test file, not sure if it’s a resource issue?are you able to reproduce this in isolation on a single test? can repeatedly re-run a test with
test --force
to see how long it takes in a steady statewitty-crayon-22786
07/19/2022, 8:34 PM• Because we’re sharding our tests, are there any “gotchas” with caching in CI?no: only that dependency computation will be repeated per-shard, which is why it is important to cache (the process executions)… but also for us (the Pants project) to optimize the heck out of the portion that cannot be cached. we know of one issue there that is on the 2.14.x docket, but which probably can’t be backported to 2.13.x
lemon-finland-60184
07/19/2022, 9:07 PMcan repeatedly re-run a test withOkay, so after a bunch of test runs, the baseline for one of my test files is consistently 60-70s to run all the tests in it. Whereas, in CI, it's much longer for the same file (300-400s the last couple runs), so leads me to believe it's some resource contention issue with how many tests we're running in parallel.to see how long it takes in a steady statetest --force
hundreds-father-404
07/19/2022, 9:10 PMwitty-crayon-22786
07/21/2022, 12:04 AMA few performance fixes went intoi lied: these had not actually been released yet. but they’ll go into, so you should see a small bump there.a1
2.13.0rc0
tonight.cold-soccer-63228
07/21/2022, 12:21 AMwitty-crayon-22786
07/21/2022, 12:22 AMwitty-crayon-22786
07/21/2022, 12:29 AM