https://pantsbuild.org/ logo
#general
Title
# general
b

brave-hair-402

03/09/2023, 11:23 AM
Is it possible with target selection to build everything BUT some list of targets? I am thinking about how to parallelize the build jobs on CI.
h

happy-kitchen-89482

03/09/2023, 4:17 PM
<shameless plug> By far the best way to get high concurrency in CI is to use a remote execution cluster such as the one offered by Toolchain. DM me for details! </shameless plug> Beyond that, you can shard tests with the
--test-shard
flag, as explained here: https://www.pantsbuild.org/docs/advanced-target-selection#sharding-the-input-targets And that also gives an idea of how to shard other goals. But note that this way, any work (e.g., compilation) required by tests across multiple shards will be performed multiple times, so this is one example of why remote execution is the better paradigm.
šŸ‘ 1
b

broad-processor-92400

03/09/2023, 7:43 PM
Benjy's answer is better if it applies, but to answer the raw question, some options are: ā€¢ fiters https://www.pantsbuild.org/docs/advanced-target-selection e.g. we something equivalent to
pants --filter-tag-regex=foo-bar-.* package ::
to only package targets that have
tags=["foo-bar-bar"]
or
tags=["foo-bar-123"]
(allowlist), and similarly
pants --filter-tag-regex=-foo-bar-.* package ::
to package everything except them (blocklist) ā€¢
-
prefix on a CLI target https://www.pantsbuild.org/docs/goals#goal-arguments, e.g.
pants package :: -path/to/ignored:: -some/other:target
šŸ‘ 1
b

brave-hair-402

03/09/2023, 7:51 PM
Thank you both. I might look into remote execution Server at some point; but I am still evaluating pants on a subset of our repo. If that goes well we might roll it out on the rest of the repo. Until then I am not willing to make an investment.
4 Views