high-yak-85899
05/19/2022, 11:47 PMProcess
(or a subclass of it). What could I reference for when I don't need this functionality (e.g. the library doing the work is a python library in the plugin environment and not a call out to the system)?high-yak-85899
05/20/2022, 12:09 AMpants.toml
can contain my new repositories options and that pex_binary
shows up with a ./pants list publish
wide-midnight-78598
05/20/2022, 12:52 AMwide-midnight-78598
05/20/2022, 12:53 AMhigh-yak-85899
05/20/2022, 12:53 AMrules.py
(much like your blog). I have a third party module that can do the things I need. I don't need to call out to some binary on the system.high-yak-85899
05/20/2022, 12:54 AMhigh-yak-85899
05/20/2022, 12:55 AMIn most of the plugins, a Process is createdYeah, that's kind of my issue. I don't need to follow that pattern 😞
wide-midnight-78598
05/20/2022, 12:56 AMwide-midnight-78598
05/20/2022, 12:56 AMhigh-yak-85899
05/20/2022, 12:56 AMimport artifactory
artifactory.<my call here>
wide-midnight-78598
05/20/2022, 12:57 AMhigh-yak-85899
05/20/2022, 12:58 AMhigh-yak-85899
05/20/2022, 12:59 AMpytest
stuff works internally cause maybe that's similarwide-midnight-78598
05/20/2022, 12:59 AMwide-midnight-78598
05/20/2022, 12:59 AMPexProcess
out of it, but 🤷wide-midnight-78598
05/20/2022, 1:01 AMpackage
goal?high-yak-85899
05/20/2022, 1:01 AMpublish
for a pex_binary
high-yak-85899
05/20/2022, 1:03 AM@rule
function. Namely, I've seen some mention about reading from disk causing issues with caching. I would have to get credentials from a location on disk for this goal to work.high-yak-85899
05/20/2022, 1:03 AMhundreds-father-404
05/20/2022, 1:03 AMartifactory
is not doing side-effecty things like reading from the file system. If it is, Pants won't know how to cache it properlywide-midnight-78598
05/20/2022, 1:04 AMhigh-yak-85899
05/20/2022, 1:05 AMcache_scope=ProcessCacheScope.PER_SESSION
which I followed as "not caching"hundreds-father-404
05/20/2022, 1:05 AMProcess
so that things get cached to disk. Otherwise, it only gets memoized to memory w/ pantsd
worth wrapping into aBy building a PEX w/Process
artifactory
, then invoking it in a Process
hundreds-father-404
05/20/2022, 1:05 AMYeah, but for publishing, I don't think actions are cached anyway.That's the issue - Pants will think it's safe to memoize and won't invalidate for you
hundreds-father-404
05/20/2022, 1:05 AM@_uncacheable_rule
iirchigh-yak-85899
05/20/2022, 1:07 AMhigh-yak-85899
05/20/2022, 1:08 AMProcess
wide-midnight-78598
05/20/2022, 1:10 AMwide-midnight-78598
05/20/2022, 1:12 AMhigh-yak-85899
05/20/2022, 1:58 AMhigh-yak-85899
05/20/2022, 2:00 AMhigh-yak-85899
05/20/2022, 2:00 AMnpm
install optionhigh-yak-85899
05/20/2022, 2:06 AM