Have a question for the room: I am trying to setup...
# general
Have a question for the room: I am trying to setup a remote caching server to use with pants in a CICD pipeline. In trying to test out Pants (v1.30.4) cache settings I used the following config in pants.toml
Copy code
resolver = 'rest'
read_from = ['<http://localhost:8080>']
write_to = ['<http://localhost:8080>']
I have tried everything I can think of but I cannot seem to get Pants to make requests to a remote cache or fail when passing invalid cache locations...
Hey @proud-jackal-16497 can you clear up the Pants version? v1.3.4 appears to be a typo. Maybe include the relevant
[GLOBAL] pants_version
section of your pants.toml.
oops, yes sorry
Copy code
pants_version = "1.30.4"
pythonpath = ["%(buildroot)s/plugins"]
backend_packages = ["pack"]
@enough-analyst-54434 ☝️
Ah, ok. Yeah. I'm fuzzy on the old Pants config. Pants 2.x does this a bit different.
yeah unfortunately we're still using v1 until v2 works supports Go
We definitely used this for remote caching in v1 back in the day, and it worked, so there is probably some small bit of config missing, I will go look at the 1.30.x code and remind myself how it works...
@proud-jackal-16497 just to clarify, what is
in your config? Have you tried putting your remote cache URL in
and not setting
means that the urls in `read_from`/`write_to` are discovery URLs that should return a JSON object whose
key has the value of a list of actual URLs
but before we do that, let's see if hard-coding the cache URLs directly in the `read_from`/`write_to` works
Those URLs should be of a RESTful cache service that does the right thing for PUT/HEAD/GET/DELETE.
hey @happy-kitchen-89482 thanks for the response, I missed this over the weekend!
yeah i have tried without resolver (thanks for clarifying the purpose, wasnt sure if that was needed or not)
localhost is a webdav server configured using NGINX, but im not seeing any requests being made to it using the above config (with or without resolver)
Hmm, try running Pants with
to seee if the debug output gives you anything useful
hey @happy-kitchen-89482 thanks for the tip, still messing around with this feature - one more question though...
is the purpose of this cache to be able to share data that lives in
? or something else?
we're just getting started with pants so trying to figure out the difference between the setup cache and artifact caches or if they are the same thing
This is the artifact cache, which is different
This caches fine-grained work
The local artifact cache might go under
, I don't recall
but the other stuff in there is mostly related to the Pants installation
gotcha, thanks!