In pants v1, when a pex was created (for a binary ...
# pex
p
In pants v1, when a pex was created (for a binary target) it would add some build properties from run tracker: https://github.com/pantsbuild/pants/blob/master/src/python/pants/backend/python/tasks/python_binary_create.py#L171 I am mostly interested in the scm info (revision) which came thru here: https://github.com/pantsbuild/pants/blob/29cf9fc8b25a540f32e4a9e0aeeaaa6ea4dcc48f/src/python/pants/base/run_info.py#L103 Is there anyway to bring this back to v2 ? where would we do it ? It is helpful to know which git hash was used when building a specific pex file because it allows tools like sentry to trace back regressions to specific commits. (for example) https://docs.sentry.io/workflow/releases/?platform=python
h
The PEX CLI would need to have a mechanism to do this, which I don’t think it has, but maybe we could add to Pex. Or we would need to mutate the generated zip file, which isn’t ideal
We would want to leave off nondeterministic attributes like the timestamp, but SCM info seems useful
a
+1, we also rely on this in a similar manner
👍 1
h
Good to know! @astonishing-jelly-60479 which attributes do you depend upon?
(The reason I said we’d want to leave off timestamp is that it will mess with caching.)
a
just revision, though it's been nice to see the timestamp/cmdline/machine on rare occasions for debugging
👍 1
and, personally, i've always wished for the pants target itself, too
h
As in, the address to the
python_binary
target, right? Sounds very useful indeed.
a
yeah
👍 2
p