I think I'm ready for the final push. I have my `D...
# plugins
h
I think I'm ready for the final push. I have my
DownloadedExternalTool
properly configured. I have my
PublishRequest
which has pacakages inside it for me to push, but I'm getting a little turned around on the proper syntax of things. I want to take all the pex files and execute a command like
jf rt u <pex file name here>
. I think I need to do something like
await Get(Snapshot, package.digest)
so I can get a file name and then something like
Process([tool.exe, 'rt', 'u', snapshot.<something to get the file path?>], input_digest=package.digest)
. Does that seem right?
Seems like
DigestEntries
instead, but something like this
h
you would use
snapshot.files[0]
, and make sure you set
input_digest=package.digest
(or
snapshot.digest
, the same thing)
I do not recommend
DigestContents
- it will load more than necessary. You only need path name
h
sounds good!
oops, sorry, I meant
DigestEntries
in my second message
Does that change your recommendation to use a snapshot?
h
ohh -- not much difference. I think
Snapshot
is marginally faster. more conventional too The idea w/
Snapshot
is "a digest + its file paths"
h
Cool, I'll use that
Very close to working. I gave the
Digest
of the pex package to my
Process
for publishing, but I got a
FileNotFoundError
from the
InteractiveProcess
that was attempted to run. I know the file is there because I logged by
DigestEntries
of the
Digest
to the terminal. Anything else that's expected to get wired up?
h
hm, it can be helpful here to use
--no-process-cleanup
so you can inspect the chroot. Env vars maybe, like
PEX_EXTRA_SYS_PATH
(aka PYTHONPATH)
h
From poking around, that seems more important for running a pex. I just want the file. Don't need to actually do anything with it.
Oh I have an idea
I didn't include the digest for the tool
So it was complaining about not finding the tool while I thought it was about the pex