bright-monitor-59146
09/07/2023, 12:36 AMpants package take advantage of remote caching?broad-processor-92400
09/07/2023, 12:38 AMpants packages :: builds a pex_binary target, that'll be doing an invocation of a pex ... process under the hood, and the outputs of this invocation can be served from a remote cache if available.
Are you observing something unexpected?bright-monitor-59146
09/07/2023, 12:44 AMpants package :: in two different gitlab CI jobs at this point, i do have a container of buchgr/bazel-remote-cache running and I have pants configured to use it in pants.ci.toml . the first CI job took 1m38s according to gitlab, but the second took 2m - but oddly the first job metrics for remote_cache_total_time_saved_ms is 491094 while the second is 521192bright-monitor-59146
09/07/2023, 12:45 AMbright-monitor-59146
09/07/2023, 12:45 AMbright-monitor-59146
09/07/2023, 12:47 AMpackage goal also made use of remote cachingbroad-processor-92400
09/07/2023, 12:48 AMpackage likely generally has larger artefacts than goals like test, so the download might take noticeably longer too?bright-monitor-59146
09/07/2023, 12:53 AMpants package on code (lambdas) that have actually changed - the “using Pants in CI” docs point to using remote caching and running goals “over everything” but in this case I would have to assume that no matter what, pants package :: would always spit out every package, even if it has to pull it from the cachebright-monitor-59146
09/07/2023, 12:54 AM--changed-since for the package goalbright-monitor-59146
09/07/2023, 1:17 AMpants package :: in my CI yaml even if i’ve only changed the code in a single lambdahappy-kitchen-89482
09/07/2023, 3:39 AMpants package :: will place all the requested artifacts in dist/, so it does do work every time. The ingredients of that work can be cached, but it still has to download them and write them out, and that can be non-trivial if large.happy-kitchen-89482
09/07/2023, 3:39 AM--changed-since=<gitref> --changed-dependents=transitive is what you wantbright-monitor-59146
09/07/2023, 3:51 AMbright-monitor-59146
09/07/2023, 3:51 AMhappy-kitchen-89482
09/07/2023, 12:50 PMpants package is a side effect (materializing files to local disk) so it must run every timehappy-kitchen-89482
09/07/2023, 12:51 PM