dazzling-diamond-4749
09/07/2021, 11:11 PMsplit -l $block_size
. I suspect that I need to toposort and dedupe test targets?witty-crayon-22786
09/07/2021, 11:17 PMwitty-crayon-22786
09/07/2021, 11:21 PMwitty-crayon-22786
09/07/2021, 11:22 PMdazzling-diamond-4749
09/07/2021, 11:22 PMdazzling-diamond-4749
09/07/2021, 11:23 PMdazzling-diamond-4749
09/07/2021, 11:23 PMwitty-crayon-22786
09/07/2021, 11:25 PMwitty-crayon-22786
09/07/2021, 11:26 PMdazzling-diamond-4749
09/07/2021, 11:26 PM22:20:50.31 [WARN] Failed to generate coverage data for some/package/test/python/my/test.py:tests
dazzling-diamond-4749
09/07/2021, 11:27 PMwitty-crayon-22786
09/07/2021, 11:30 PMtest --debug
, are you?dazzling-diamond-4749
09/07/2021, 11:30 PM--debug
flag and run againwitty-crayon-22786
09/07/2021, 11:30 PM--debug
.witty-crayon-22786
09/07/2021, 11:31 PMwitty-crayon-22786
09/07/2021, 11:31 PM--debug
causes things to run sequentially in the foreground, and it disables some portions of coverage capture.dazzling-diamond-4749
09/07/2021, 11:31 PMwitty-crayon-22786
09/07/2021, 11:31 PMtoml
config for CI by any chance?dazzling-diamond-4749
09/07/2021, 11:31 PMwitty-crayon-22786
09/07/2021, 11:32 PM[test] debug
?dazzling-diamond-4749
09/07/2021, 11:32 PM[test]
use_coverage = true
[coverage-py]
report = ["json", "html"]
global_report = true
witty-crayon-22786
09/07/2021, 11:33 PMwitty-crayon-22786
09/07/2021, 11:34 PMdazzling-diamond-4749
09/07/2021, 11:34 PMwitty-crayon-22786
09/07/2021, 11:35 PM./pants dependees $target
should tell you if that target is being pulled in elsewherewitty-crayon-22786
09/07/2021, 11:36 PM./pants filter --target-type=python_tests :: | xargs ./pants dependees
to check all test targets at oncedazzling-diamond-4749
09/07/2021, 11:40 PM$ ./pants filter --target-type=python_tests :: | xargs ./pants dependees 13s
16:39:26.19 [INFO] Initialization options changed: reinitializing scheduler...
16:39:26.89 [INFO] Scheduler initialized.
16:39:28.07 [INFO] Initialization options changed: reinitializing scheduler...
16:39:29.14 [INFO] Scheduler initialized.
No such targets found.
One more interesting observation, the ordering of files in the test report is different in CI and locally, when I run the same command.witty-crayon-22786
09/07/2021, 11:41 PMwitty-crayon-22786
09/07/2021, 11:42 PMdazzling-diamond-4749
09/07/2021, 11:42 PMdazzling-diamond-4749
09/07/2021, 11:43 PMwitty-crayon-22786
09/07/2021, 11:46 PMtest --output=all
(or set [test] output = "all"
) to have the tests dump their output, which might include some more information about why the .coverage
file wasn’t writtendazzling-diamond-4749
09/07/2021, 11:52 PM./pants -l=error filter --filter-target-type=python_tests :: | sort > /tmp/all_tests
total_tests=$(cat /tmp/all_tests | wc -l)
total_blocks=$BUILDKITE_PARALLEL_JOB_COUNT
if test -z "$total_blocks"; then
total_blocks=1
fi
current_block=$BUILDKITE_PARALLEL_JOB
if test -z "$current_block"; then
current_block=0
fi
block_size=$(((total_tests/total_blocks)+1))
size as well
split -l $block_size -a 1 /tmp/all_tests test_target_set_
extra_space=$((block_size*total_blocks-total_tests))
empty_blocks=$((extra_space/block_size))
alphabet=({a..z})
block_index=${alphabet[current_block]}
# Skip empty blocks
if [ "$current_block" -ge "$((total_blocks-empty_blocks))" ]; then
exit 0
fi
tests_to_run=$(cat test_target_set_$block_index | tr "\n" " ")
./pants test --output=all $tests_to_run
dazzling-diamond-4749
09/08/2021, 12:58 AMdazzling-diamond-4749
09/08/2021, 1:00 AMhundreds-father-404
09/08/2021, 1:02 AMhundreds-father-404
09/08/2021, 1:14 AMdazzling-diamond-4749
09/08/2021, 1:14 AMDo you expect the tests to be using lots of memory?Ohhhhhh, maybe. Its loading BERT, LOL
hundreds-father-404
09/08/2021, 1:15 AMdazzling-diamond-4749
09/08/2021, 1:16 AMhundreds-father-404
09/08/2021, 1:19 AMdazzling-diamond-4749
09/08/2021, 1:23 AMwitty-crayon-22786
09/08/2021, 1:53 AMdazzling-diamond-4749
09/08/2021, 1:55 AMexit -x
is --> kill -x
?witty-crayon-22786
09/08/2021, 2:03 AMdazzling-diamond-4749
09/08/2021, 2:03 AM128 + SIG
as the standard conventionwitty-crayon-22786
09/08/2021, 2:07 AMdazzling-diamond-4749
09/08/2021, 2:08 AMSIGINT
is correctly caught and surfaced as Neg(sig)
<-- does this suffice?witty-crayon-22786
09/08/2021, 2:17 AMdazzling-diamond-4749
09/08/2021, 2:18 AMexit_status.signal().map(tee(print)).map(Neg::neg))
witty-crayon-22786
09/08/2021, 2:18 AMdazzling-diamond-4749
09/08/2021, 2:18 AMtee
happy-kitchen-89482
09/08/2021, 9:44 AM