curved-television-6568
12/02/2022, 10:46 PMcurved-television-6568
12/02/2022, 10:52 PM╰─❯ ./pants -ltrace check src/python/pants/backend/visibility/rules.py
I observe (amongst the thousands lines of log, these two in particular):
17:42:51.82 [DEBUG] Completed: Hit: Local cache lookup: Determine distributions found in mypy.pex
17:42:51.82 [DEBUG] Completed: Scheduling: Determine distributions found in mypy.pex
There’s nothing strange with that, a cache hit, go figure 🙂
Now, when I run the same command again, but with debug rather than trace level:
╰─❯ ./pants -ldebug check src/python/pants/backend/visibility/rules.py
I don’t see those lines at all…witty-crayon-22786
12/02/2022, 10:53 PMwitty-crayon-22786
12/02/2022, 10:53 PM@rule
is memoized (i.e. held in memory by pantsd
), it doesn’t need to re-runwitty-crayon-22786
12/02/2022, 10:54 PM@rule
runs in a particular process (i.e. before it is memoized)curved-television-6568
12/02/2022, 10:57 PMcurved-television-6568
12/02/2022, 10:58 PM95153 ?? S 0:00.03 /Users/andreas.stenius/.cache/pants/named_caches/pex_root/venvs/s/3f67de6f/venv/bin/python3.9 -E -s -c from multiprocessing.resource_tracker import main;main(14)
95154 ?? S 0:00.40 /Users/andreas.stenius/.cache/pants/named_caches/pex_root/venvs/s/3f67de6f/venv/bin/python3.9 -E -s -c from multiprocessing.spawn import spawn_main; spawn_main(tracker_fd=18, pipe_handle=38) --multiprocessing-fork
95194 ?? S 0:00.04 /Users/andreas.stenius/.cache/pants/named_caches/pex_root/venvs/s/3f67de6f/venv/bin/python3.9 -E -s -c from multiprocessing.resource_tracker import main;main(14)
95195 ?? S 0:00.11 /Users/andreas.stenius/.cache/pants/named_caches/pex_root/venvs/s/3f67de6f/venv/bin/python3.9 -E -s -c from multiprocessing.spawn import spawn_main; spawn_main(tracker_fd=18, pipe_handle=38) --multiprocessing-fork
^^ killed thesecurved-television-6568
12/02/2022, 10:59 PM17:57:23.93 [DEBUG] Completed: Scheduling: Determine distributions found in mypy.pex
was present now with -ldebug
curved-television-6568
12/02/2022, 10:59 PMwitty-crayon-22786
12/02/2022, 11:00 PMpantsd
invalidates correctly when the log level changes. it really ought to restart in that case.curved-television-6568
12/02/2022, 11:01 PMwitty-crayon-22786
12/02/2022, 11:03 PMdaemon=True
: https://github.com/pantsbuild/pants/blob/3bf22003b6ec2942077e0100e5b2453312229746/src/python/pants/option/global_options.py#L654-L669 … which should mean that pantsd
restarts whenever it changescurved-television-6568
12/02/2022, 11:04 PM18:04:03.55 [DEBUG] terminating pantsd
curved-television-6568
12/02/2022, 11:05 PMwitty-crayon-22786
12/02/2022, 11:06 PMwitty-crayon-22786
12/02/2022, 11:07 PM-ltrace
session should be relatively quiet on the second run… you’re seeing that, right?curved-television-6568
12/02/2022, 11:09 PMcurved-television-6568
12/02/2022, 11:10 PM-ltrace
I don’t see the Hit:
lines either, guess that’s due to memoizationwitty-crayon-22786
12/02/2022, 11:10 PMcurved-television-6568
12/02/2022, 11:12 PMwitty-crayon-22786
12/02/2022, 11:12 PMwitty-crayon-22786
12/02/2022, 11:13 PM@rules
)curved-television-6568
12/02/2022, 11:13 PMwitty-crayon-22786
12/02/2022, 11:14 PM-ldebug
and look for a “spawning” line, which will contain the complete inputs to the process, which define whether it hits the cache.witty-crayon-22786
12/02/2022, 11:14 PM-ldebug
, and take a look at the process signaturewitty-crayon-22786
12/02/2022, 11:16 PMwitty-crayon-22786
12/02/2022, 11:17 PMcurved-television-6568
12/02/2022, 11:18 PMcurved-television-6568
12/02/2022, 11:18 PMwitty-crayon-22786
12/02/2022, 11:18 PMspawned local
lines should helpcurved-television-6568
12/02/2022, 11:18 PMcurved-television-6568
12/02/2022, 11:18 PMwitty-crayon-22786
12/02/2022, 11:19 PMcurved-television-6568
12/02/2022, 11:19 PMcurved-television-6568
12/02/2022, 11:20 PMcurved-television-6568
12/14/2022, 1:02 AM./pants check some/src/file
and the spawned process for “building requirements_venv.pex” where identical apart from this little tidbit:
input_files: DirectoryDigest { digest: Digest { hash: Fingerprint<f72844a672f0a780c2968ea0bacf9dd01cb90556316f66b0d01fdb55655b3f44>, size_bytes: 428 }, tree: "Some(..)" },
vs
input_files: DirectoryDigest { digest: Digest { hash: Fingerprint<4cc4a1c0af01fa1f08a1b6636a9e07408bb6fd8d440184e897d85bfcb5ce52bf>, size_bytes: 428 }, tree: "Some(..)" },
where the inputs ought to have been identical in both cases (only some time and other runs came in between..)
Not much to go on here, more than thinking about what may go into the hash calculation..?witty-crayon-22786
12/14/2022, 4:16 AM./cargo run -p fs_util -- directory materialize 4cc4a1c0af01fa1f08a1b6636a9e07408bb6fd8d440184e897d85bfcb5ce52bf 428 $(pwd)/dest
to check a digest out into a directorywitty-crayon-22786
12/14/2022, 4:18 AMcurved-television-6568
12/14/2022, 2:47 PMbitter-ability-32190
12/14/2022, 2:48 PMcurved-television-6568
12/14/2022, 2:54 PMcurved-television-6568
01/12/2023, 7:49 PMfs_util
continues to insist those are not in my store.. tried with another digest just in case, but that’s missing too, so I get the feeling I’m doing something wrong.curved-television-6568
01/12/2023, 7:50 PMfs_util --local-store-path /Users/andreas.stenius/.cache/pants/lmdb_store directory materialize fc33a6ab65993fa57d52edbff44d8a8a89faa2ec0669950d238b481da5caf15c 91 ex
curved-television-6568
01/12/2023, 7:50 PMfs_util directories list
works though… 🤔curved-television-6568
01/12/2023, 7:51 PMcurved-television-6568
01/12/2023, 7:51 PMcurved-television-6568
01/12/2023, 7:52 PMwitty-crayon-22786
01/12/2023, 7:58 PMcurved-television-6568
01/12/2023, 8:01 PMcurved-television-6568
01/12/2023, 8:02 PM~/.cache/pants/lmdb_store
) ??curved-television-6568
01/12/2023, 8:04 PMwitty-crayon-22786
01/12/2023, 8:07 PMcache_content_behavior=fetch
witty-crayon-22786
01/12/2023, 8:08 PMcurved-television-6568
01/12/2023, 8:08 PMfs_util
for talking to a remote..? but I don’t know if I have the values to put in there 😛curved-television-6568
01/12/2023, 8:09 PMcurved-television-6568
01/12/2023, 8:10 PM$(pwd)
in there already…
fs_util directory materialize 482dcf98a500c7695987f5ec1681b639b4a320e7fa3a9d96f889da0a4e7c4e1f 420 $(pwd)/dbg1
Could not walk unknown directory at "": Was not present in the local store: Digest { hash: Fingerprint<482dcf98a500c7695987f5ec1681b639b4a320e7fa3a9d96f889da0a4e7c4e1f>, size_bytes: 420 }
witty-crayon-22786
01/12/2023, 8:10 PMcurved-television-6568
01/12/2023, 8:11 PMcurved-television-6568
01/12/2023, 8:11 PM+ complete: DirectoryDigest { digest: Digest { hash: Fingerprint<bc7b8a195c792ed86f878fef6fabdd84fad38d4fc5d174a3c27d35caa32a49ed>, size_bytes: 420 }, tree: "Some(..)" },
witty-crayon-22786
01/12/2023, 8:13 PMcurved-television-6568
01/12/2023, 8:13 PMcurved-television-6568
01/12/2023, 8:13 PM- complete: DirectoryDigest { digest: Digest { hash: Fingerprint<482dcf98a500c7695987f5ec1681b639b4a320e7fa3a9d96f889da0a4e7c4e1f>, size_bytes: 420 }, tree: "Some(..)" },
+ complete: DirectoryDigest { digest: Digest { hash: Fingerprint<bc7b8a195c792ed86f878fef6fabdd84fad38d4fc5d174a3c27d35caa32a49ed>, size_bytes: 420 }, tree: "Some(..)" },
nailgun: DirectoryDigest { digest: Digest { hash: Fingerprint<e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855>, size_bytes: 0 }, tree: "Some(..)" },
- input_files: DirectoryDigest { digest: Digest { hash: Fingerprint<482dcf98a500c7695987f5ec1681b639b4a320e7fa3a9d96f889da0a4e7c4e1f>, size_bytes: 420 }, tree: "Some(..)" },
+ input_files: DirectoryDigest { digest: Digest { hash: Fingerprint<bc7b8a195c792ed86f878fef6fabdd84fad38d4fc5d174a3c27d35caa32a49ed>, size_bytes: 420 }, tree: "Some(..)" },
curved-television-6568
01/12/2023, 8:15 PM"Building 51 requirements for src.python/testing.pex from the 3rdparty/python/lockfiles/default.txt resolve: Brotli==1.0.9, Django==[...] zenpy==1.1.12"
witty-crayon-22786
01/12/2023, 8:15 PMcurved-television-6568
01/12/2023, 8:16 PMwitty-crayon-22786
01/12/2023, 8:16 PMcurved-television-6568
01/12/2023, 8:16 PMcurved-television-6568
01/12/2023, 8:19 PMwe stopped persisting all DirectoryDigestswhat does this imply for caching, though? are they rebuilt as needed from FileDigests, if that’s a thing?
witty-crayon-22786
01/12/2023, 8:20 PMwitty-crayon-22786
01/12/2023, 8:20 PMwitty-crayon-22786
01/12/2023, 8:21 PMcurved-television-6568
01/12/2023, 8:25 PMwitty-crayon-22786
01/12/2023, 8:40 PMwitty-crayon-22786
01/12/2023, 8:41 PMwitty-crayon-22786
01/12/2023, 8:42 PMwitty-crayon-22786
01/12/2023, 8:42 PMcurved-television-6568
01/12/2023, 8:52 PMwitty-crayon-22786
01/13/2023, 11:26 PMwitty-crayon-22786
01/14/2023, 12:03 AMwitty-crayon-22786
01/18/2023, 12:23 AMcurved-television-6568
03/08/2023, 5:54 PM12:53:09.10 [INFO] Remote cache/execution options updated: reinitializing scheduler...
12:53:11.01 [INFO] Scheduler initialized.
curved-television-6568
03/08/2023, 5:55 PMwitty-crayon-22786
03/08/2023, 5:56 PMwitty-crayon-22786
03/08/2023, 5:56 PMcurved-television-6568
03/08/2023, 5:56 PMwitty-crayon-22786
03/08/2023, 5:56 PMcurved-television-6568
03/08/2023, 5:58 PM12:54:34.87 [DEBUG] Completed: Remote cache lookup for: Building pytest_runner.pex
12:54:34.87 [DEBUG] Completed: Remote cache lookup for: Building pytest_runner.pex
12:54:34.87 [DEBUG] remote cache miss for: "Building pytest_runner.pex" digest=Digest { hash: Fingerprint<ae4679a4bdfaebb90dc0f9a213e4dddc52f2989a17c947778f19bfb494746e5b>, size_bytes: 142 }
12:54:34.87 [DEBUG] remote cache miss for: "Building pytest_runner.pex" digest=Digest { hash: Fingerprint<6c55ec4df6c146c95c2ef37248ea3fb6011b6b28b7f06859b0814e26af69aec7>, size_bytes: 142 }
curved-television-6568
03/08/2023, 5:59 PMwitty-crayon-22786
03/08/2023, 5:59 PMcurved-television-6568
03/08/2023, 5:59 PMcurved-television-6568
03/08/2023, 6:00 PMcurved-television-6568
03/08/2023, 6:00 PMwitty-crayon-22786
03/08/2023, 6:04 PMcurved-television-6568
03/08/2023, 6:09 PMwitty-crayon-22786
03/08/2023, 6:10 PMwitty-crayon-22786
03/08/2023, 6:10 PMcurved-television-6568
03/08/2023, 6:19 PMwitty-crayon-22786
03/08/2023, 6:19 PMcurved-television-6568
03/08/2023, 6:19 PMwitty-crayon-22786
03/08/2023, 6:22 PMcurved-television-6568
03/08/2023, 7:55 PMcurved-television-6568
03/08/2023, 7:56 PMwitty-crayon-22786
03/08/2023, 8:15 PMcurved-television-6568
03/09/2023, 3:00 PMcurved-television-6568
03/09/2023, 3:01 PMcurved-television-6568
03/09/2023, 6:55 PMwitty-crayon-22786
03/09/2023, 6:56 PMcurved-television-6568
03/09/2023, 7:01 PM[test]
extra_env_vars = ["DJANGO_TESTING=true"]
curved-television-6568
03/09/2023, 7:02 PMwitty-crayon-22786
03/09/2023, 7:02 PMcurved-television-6568
03/09/2023, 7:03 PMwitty-crayon-22786
03/09/2023, 7:04 PMcurved-television-6568
03/09/2023, 7:04 PMcurved-television-6568
03/27/2023, 2:34 PM10:24:58.27 [INFO] Completed: Building 1 requirement for requirements.pex from the 3rdparty/python/lockfiles/default.txt resolve: boto3==1.20.8
… that it subsets only the required libs from the lockfile for each particular case, so depending on what sources I lint, it will need a different requirements_venv.pex based on what libs are used for each set of targets. With a large-ish lockfile this set tends to have many permutations leading to frequent rebuilds.. feels like it would be more efficient to just create on large pex with all requirements then, as that is what’s going to be used in the end any way there shouldn’t be any issues besides potentially being a little slower to setup but beats rebuilding it frequently.
So I think this is https://www.pantsbuild.org/docs/reference-python#run_against_entire_lockfile that I want to test with having turned on..curved-television-6568
03/27/2023, 2:35 PMhappy-kitchen-89482
03/27/2023, 2:43 PMhappy-kitchen-89482
03/27/2023, 2:44 PMcurved-television-6568
03/27/2023, 2:46 PMenough-analyst-54434
03/27/2023, 2:47 PMcurved-television-6568
03/27/2023, 2:47 PMenough-analyst-54434
03/27/2023, 2:48 PMcurved-television-6568
03/27/2023, 2:48 PMenough-analyst-54434
03/27/2023, 2:48 PMcurved-television-6568
03/27/2023, 2:49 PMenough-analyst-54434
03/27/2023, 2:49 PMcurved-television-6568
03/27/2023, 2:50 PMenough-analyst-54434
03/27/2023, 2:51 PMcurved-television-6568
03/27/2023, 2:52 PMbitter-ability-32190
03/27/2023, 2:52 PMinternal_only
should default to True
. There are far far far many more internal PX codepaths than not.enough-analyst-54434
03/27/2023, 2:53 PMenough-analyst-54434
03/27/2023, 2:54 PMbitter-ability-32190
03/27/2023, 2:54 PMenough-analyst-54434
03/27/2023, 2:54 PM