Hey, guys! trying to setup remote cache for pants,...
# general
c
Hey, guys! trying to setup remote cache for pants, is there a way work with auth 2.0 flow and specify credentials or headers to make urls in `write_to`/`read_from` use it or do you have to create a plugin overriding the default behavior?
e
There is no support for this today and, unfortunately, there is no way to hook this pants infra with a plugin. This requires a contribution to pants core code. That bad news aside, I have interest in this exact feature at this exact time. Things should start off with an enhancement issue outlining the feature, but both the build stats and build cache servers pants can be configured to talk to could use this feature today.
c
@enough-analyst-54434 I see, ty for the response! just to clarify so having something like these plugins https://github.com/toddgardner/pants-plugins isn’t going to work as short-time solution? Also, how people do it now? Like if someone wants to use google storage for remote cache are they just using some proxies like
varnish
that was mentioned in the docs or some other service
^ docs mention I’m talking about https://www.pantsbuild.org/setup_repo.html#build-cache
The remote server should be a RESTful server that can handle GET, HEAD, PUT, and DELETE requests on large binary blobs. E.g., you can implement this using Varnish in front of nginx (with dav_methods PUT DELETE; enabled).
e
Aha. Well, that monkey-patches core code. So it works, but not a robust way to do things. That will break without warning on some future pants upgrade.
I'm pretty sure folks either run internal caches or at least an internal proxy.
c
Ok, I’ll try to go with a proxy approach then, and will be excited to see this feature in future updates. Ty very much!