I’m looking at the `init-pants` GH action, and get...
# development
c
I’m looking at the
init-pants
GH action, and get slightly confused wrgt remote caching..
`cache-lmdb-store`: Pass the string
'true'
to enable caching pants’ lmdb store in a GHA cache. By default, this action does NOT cache the
lmdb_store
. This is a very coarse cache that can grow unbounded. So, it is very likely to hit GitHub’s 10GB per repo max for action caches. If you enable this, you need another process or workflow to manage discarding older GHA caches, or minimizing the cache size as described in the docs. Use the default if using remote caching.
This suggests that remote caching does work, while:
This action does not use any secrets at this point. It might need some once it supports projects that use remote caching.
Seems to say it doesn’t.. 🤷
p
The action itself doesn't go anything with remote caching. I expect it to work. But the action needs some input parameters or secrets to setup remote caching, then it will need to add them. I have not used remote caching. Is there something this action should do to help set up remote caching? If not, it should be supported just as any other setting in pants.toml.
c
guess it will just work then, in which case the secrets note is misleading..
p
I added that note because I'm not sure if secrets or something is required for remote caching
f
The repository owner would need to be running (or have access to) a deployed REAPI-compatible cache server.
Secrets would be needed for auth in some cases (.e.g, Toolchain's cache offering) although Toolchain has a Pants plugin which handles those details.
c
yea I don’t think there’s anything required of
init-pants
for that.. we’ll see how far I get with this 🙂
p
Benjy wrote the note about caching lmbd store
Feel free to drop my comment 😛
c
ok, good. just the phrasing that didn’t come across clearly, so I think the comment is fine, would only tweak it slightly 😉
OK, so it seems there’s no issues with remote execution and the
init-pants
action. I do however get this on the “Post action” phase of the run:
Copy code
Warning: Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.
I think it is for the “Cache Pants named caches” step. This is running in a container, so user/home etc tend to be wonky (e.g. root).
1
huh.. looking at the pants config, seems it’s running with
"*named*_caches_dir": ".cache/pants/named_caches"
wouldn’t have expected a relative path here…
aahh, nvm, someone put that relative path in our
pants.ci.toml
file.. 😜
conclusion being, that the cache paths used in the
init-pants
action assumes default paths rather than looking at the configuration..