high-yak-85899
06/14/2022, 3:53 PMexec
into a bash shell of my container, but not sure how to access the pex's interpreter that has all the third party dependencies I need.abundant-hospital-56388
06/14/2022, 4:20 PM./pants run
command as well as in ./pants repl
.
I'm running it on my local Ubuntu 22.04 machine where apparently the sys.excepthook
is replaced by some apport_excepthook
. Trio tries to deal with that, but needs to import apport_python_hook
which seems to not exist in the pants environment.
I'm wondering how the environment that the ./pants run
and ./pants repl
command are working in is set up.
It seems to be somewhere between venv and running the system python natively as follows:
• it is not able to import apport_python_hook
which is available when running python3.10 on my system directly, but not in a venv.
• when checking sys.excepthook.__name__
that is set to apport_excepthook
, same as when running python directly on the system, but not in venv.wide-monitor-51514
06/14/2022, 5:34 PM./pants --version --print-exception-stracktrace
wide-monitor-51514
06/14/2022, 5:35 PMwide-monitor-51514
06/14/2022, 5:36 PMwide-monitor-51514
06/14/2022, 5:37 PM--platform linux/amd64
wide-monitor-51514
06/14/2022, 5:38 PMbusy-vase-39202
06/14/2022, 7:35 PMadamant-umbrella-23142
06/14/2022, 8:45 PM>>[1]+ Stopped ./pipeline-pex.pex (venv) root@7781114-8501:~/pavithra/dagster-crawler-pipeline/dist# ./pipeline-pex.pex Python 3.8.10 (default, Mar 15 2022, 122208) [GCC 9.4.0] on linux Type "help", "copyright", "credits" or "license" for more information. (InteractiveConsole)
>>
breezy-church-49979
06/14/2022, 10:33 PMabundant-hospital-56388
06/15/2022, 1:15 PMlimited-insurance-37393
06/15/2022, 3:25 PMproud-appointment-36730
06/15/2022, 7:17 PMpants tailor
in the repo I ended up with a BUILD
file in .git/logs/refs/remotes/origin
. Contents of the BUILD
file:
python_sources()
We have sort of a complex branch naming scheme, so I'm wondering if pants tailor
saw a file in that directory that it thought was a python file and thus dumped a BUILD
file in that directory? I'm wondering how pants tailor
works its magic under the hood ...wooden-thailand-8386
06/15/2022, 8:20 PMpants
issue but maybe someone here has already solved for it 🤞 would the terraform
backend for pants help me to only trigger terraform apply
when need it?nice-florist-55958
06/15/2022, 8:58 PMv2.13.dev5
. Are there plans to let the export
goal accept addresses to specific python_requirements
targets? I saw in an example the use of ./pants export ::
but when trying to use a specific address it still resolves everything in pants.toml
. Didn't see any documented args, so didn't try anything else to see if it's my own mistake (https://www.pantsbuild.org/v2.12/docs/reference-export)ambitious-actor-36781
06/16/2022, 2:02 AMGet(Result, Request, data)
Pants assumes that data
is immutable, and forces data
to be hashable.
This then allows Pants to memoise/cache calls to Get
so no matter how many times Get(Result, Request, 1)
is called, the rule will only ever get executed once.
Oh and everything is async.
How does Pants handle MultiGet( Get(Result, Request, 1), Get(Result, Request 1) )
?
Is this undefined behaviour? or can we still trust that the rule will only be ran once?proud-dentist-22844
06/16/2022, 4:18 AMfind ... | xargs -0 cat | grep ...
commands to ensure that certain python modules do not import others. The purpose is to prevent circular dependencies, or to make sure that a client lib does not accidentally depend on server libs that don't get released.
So, are there any pants goodies to help with circular dependency linting?wide-midnight-78598
06/16/2022, 4:50 AMimport-linter
https://github.com/pantsbuild/pants/issues/15247happy-kitchen-89482
06/16/2022, 7:20 AMdamp-ocean-50925
06/16/2022, 10:52 AM./pants tailor
take care of that? i feel like i`m missing something here...
Also, do you have any example for monorepo managed by pants build?
I couldn't find anything more that basic setup onlinebitter-ability-32190
06/16/2022, 11:32 AMbitter-ability-32190
06/16/2022, 11:33 AMbitter-ability-32190
06/16/2022, 2:01 PMproud-dentist-22844
06/16/2022, 2:03 PMwide-midnight-78598
06/16/2022, 2:05 PMimport-linter
(https://pypi.org/project/import-linter/) solve your problems?
Curious if there is extra value in trying to get it running with pants, after the PR is mergedproud-dentist-22844
06/16/2022, 2:06 PMimport-linter
sounds like just the thing, but I would rather have something that just reuses pants
dependency graph instead of re-doing all of that work.bitter-ability-32190
06/16/2022, 2:08 PMbitter-ability-32190
06/16/2022, 2:08 PMhappy-kitchen-89482
06/16/2022, 2:20 PMcurved-television-6568
06/16/2022, 2:44 PM