proud-byte-81916
11/16/2023, 5:03 PMsteps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Setup pants
uses: pantsbuild/actions/init-pants@v5-scie-pants
with:
# v0 makes it easy to remove the cache if needed
# increase the integer to start with a fresh cache
gha-cache-key: v0
named-caches-hash: ${{ hashFiles('python_default.lock') }}
cache-lmdb-store: "true"
- name: Check BUILD files
run: |
pants tailor --check update-build-files --check ::
- name: Lint
run: |
pants lint ::
- name: Test
run: |
pants test ::
- name: Delete pants cache if too big
run: |
# See: <https://www.pantsbuild.org/docs/using-pants-in-ci>
source scripts/utils/utils.sh
delete_cache_if_too_big ~/.cache/nce 512
delete_cache_if_too_big ~/.cache/pants/named_caches 1024
- name: Upload pants log
uses: actions/upload-artifact@v3
with:
name: pants-log
path: .pants.d/pants.log
if: always()
Thanks so much! Really appreciate the help! ๐broad-processor-92400
11/16/2023, 6:19 PMproud-byte-81916
11/16/2023, 11:05 PMbroad-processor-92400
11/17/2023, 12:54 AMbroad-processor-92400
11/17/2023, 3:17 AM[stats]
log = true
(or PANTS_STATS_LOG=true
env var), and compare the output between a run that definitely doesn't have the LMDB cache restored, and one that (attempts) to.proud-byte-81916
11/17/2023, 10:05 AMlocal_store_dir = ".cache"
local_cache = true
local_execution_root_dir = "/tmp/pants"
proud-byte-81916
11/17/2023, 10:06 AM.cache
instead of ~.cache
?broad-processor-92400
11/17/2023, 10:24 AMproud-byte-81916
11/17/2023, 10:27 AMbroad-processor-92400
11/17/2023, 11:04 AMproud-byte-81916
11/17/2023, 11:04 AMproud-byte-81916
11/17/2023, 11:04 AMproud-byte-81916
11/17/2023, 2:05 PMnamed-caches-location
parameter, and it is working back with linting, but not with tests ๐ค do you know what might be causing this difference?
In the post setup pants I get this logs:
Cache Size: ~154 MB (161432652 B)
Cache saved successfully
Cache saved with key: pants-lmdb-store-Linux-v0-479432448f0215f4da53536a583000de2b7bccd6
Post job cleanup.
Cache hit occurred on the primary key pants-named-caches-Linux-v0-f4e0953fa68e59aef2feeb91dfb839b5c18d3e6a85f5c897703b00a7207b37d9-b4c764092de4751ce3094311b57b7e0d7dae75afaf66f6f88b9368f16c5a84a5, not saving cache.
Post job cleanup.
Cache hit occurred on the primary key pants-setup-***thon_distribution_hash=f3ff38b1ccae7dcebd8bbf2e533c9a984fac881de0ffd1636fbb61842bd924de pants_version=2.17.0, not saving cache.
Could it be related to the "not saving cache"? Or should I also set the lmdb-store-location
parameter in the action?proud-byte-81916
11/17/2023, 2:28 PMlmdb-store-location
has worked, now it caches tests as well! ๐ thanks so much dear @broad-processor-92400 ๐ always appreciate a lot the support!