witty-crayon-2278609/13/2022, 7:14 PM
sparse-lifeguard-9573709/13/2022, 7:37 PM
target, but hit a wall because:
• there are so many dependencies to tailor and include on each image (we reuse the same assets for multiple apps)
• building the assets within docker was much less performant than building directly on the host (mainly because of the docker emulation perf on M1 macs)
I had the idea to string together
targets to recreate the front-end build process. we’d still need to manually tailor
targets for everything, but ideally only specify the dependencies once. and
s would depend on the final output of the shell commands instead of all the raw sources
so I might have hit a dead end
use-case I considered was injecting a
for each of our
targets, to improve our cache hit-rate. I never pursued the idea because I figured out a hack to wire in buildx’s
support to get remote caching there
also isn’t very
-friendly - to run
(which we install via
) I had to add these
and these `extra_env_vars`:
and a dependency on
I’m not sure if it’s on Pants to make
Just Work, but it is a surprising mismatch to have dedicated support for it at the bootstrapping layer and not in process execution
witty-crayon-2278609/13/2022, 8:02 PM
I’ve primarily been trying to use it to work around other not-yet-implemented features in Pants 🙂yea, that’s definitely the intent. we’d like it to be possible to get JS applications packaged this way.
my proof-of-concept showed that it’s possible to set this up, but still a bit messy. and I hit https://github.com/pantsbuild/pants/issues/16825 for a command that produced a bigi’ll take a look at this one…. getting a profile while it’s running would be helpful, but it sounds like it might have been capturing theso I might have hit a dead end
into a snapshot? that was the goal, i assume?
if you capture a zip/tar file as the output of the process instead, does performance get better?
sparse-lifeguard-9573709/13/2022, 8:50 PM
witty-crayon-2278609/13/2022, 9:14 PM
sparse-lifeguard-9573709/13/2022, 9:20 PM
witty-crayon-2278609/13/2022, 9:28 PM
I assume that you are running with(the default)? If so, you might try capturing another trace with
cache_content_behavior="fetch"to see how much of a difference that makes. If it’s significant, we can probably adjust that codepath to unconditionally use
cache_content_behavior="validate"for a local cache.
sparse-lifeguard-9573709/14/2022, 8:45 PM
witty-crayon-2278609/14/2022, 8:56 PM
workunit is still a mystery, but we can fix this bit.
sparse-lifeguard-9573709/15/2022, 3:10 PM
so nothing really proprietary about it AFAIK. will try to put something together
witty-crayon-2278609/15/2022, 3:43 PM
output dir things would drastically improve