jolly-midnight-72759
09/30/2020, 1:46 PM./pants binary run going for over 1000+ seconds with no sign of stopping because my VPN had dropped. Is there a way to set a timeout for the "Resolving requirements" stage?aloof-angle-91616
09/30/2020, 1:51 PMPEX_HTTP_TIMEOUT should work, but it also says the default is 15. it also requires that pex be built with the requests library for this to work, but i would assume we do that for the pex versions we use in pants. i will see whether we override that anywhere in pantsjolly-midnight-72759
09/30/2020, 1:57 PMaloof-angle-91616
09/30/2020, 1:58 PMjolly-midnight-72759
09/30/2020, 1:59 PMEX_HTTP_TIMEOUT=15 ./v2 binary and it failed earlier. Longer then 15 seconds. The error message is also cryptic: Cython>=0.22 and NumPy are required.jolly-midnight-72759
09/30/2020, 1:59 PM--print-exception-stacktrace has more info...aloof-angle-91616
09/30/2020, 2:00 PM--print-exception-stacktrace as you mentioned)aloof-angle-91616
09/30/2020, 2:00 PMjolly-midnight-72759
09/30/2020, 2:01 PMjolly-midnight-72759
09/30/2020, 2:01 PMaloof-angle-91616
09/30/2020, 2:01 PMjolly-midnight-72759
09/30/2020, 2:10 PMaloof-angle-91616
09/30/2020, 2:11 PMaloof-angle-91616
09/30/2020, 2:11 PMjolly-midnight-72759
09/30/2020, 2:12 PMaloof-angle-91616
09/30/2020, 2:13 PMaloof-angle-91616
09/30/2020, 2:15 PMaloof-angle-91616
09/30/2020, 2:15 PM--retries and/or --timeout on the command line we generate in pantsaloof-angle-91616
09/30/2020, 2:15 PMjolly-midnight-72759
09/30/2020, 2:21 PMaloof-angle-91616
09/30/2020, 2:21 PMjolly-midnight-72759
09/30/2020, 2:23 PMpants doesn't recognize those flags. Do I need to add them after the whole line and a --? Or is this something that needs to be added at the pex stage?aloof-angle-91616
09/30/2020, 2:23 PMjolly-midnight-72759
09/30/2020, 2:25 PMaloof-angle-91616
09/30/2020, 2:25 PMaloof-angle-91616
09/30/2020, 2:25 PMjolly-midnight-72759
09/30/2020, 2:26 PMjolly-midnight-72759
09/30/2020, 2:27 PMjolly-midnight-72759
09/30/2020, 2:30 PMpants had a pre-run, post-run feature. When our repo was running v1.18, we used a lot of shell wrapper scripts. This would be an example of where I would write a script that verifies access to the wheel repo and then kick off ./pants binary build.
If pants had a .pre-run.d/ feature, I could just drop a script in there that verifies I have network connectivity to the wheel repo. When it returns 0, the pants run continues, if it returns 1 then it would error out with a message from the script.jolly-midnight-72759
09/30/2020, 2:30 PMjolly-midnight-72759
09/30/2020, 2:30 PMjolly-midnight-72759
09/30/2020, 2:30 PMaloof-angle-91616
09/30/2020, 2:36 PM./pants itself a script instead of a larger pex file. at what point would you want the pre-run scripts to run? just before pants itself? or after some part of pants?jolly-midnight-72759
09/30/2020, 2:48 PMjolly-midnight-72759
09/30/2020, 2:50 PMpants (the bash script). Maybe this script could be modified to look in a .pants.d/pre-pants directory and source the scripts if finds there. Then people could customize pants without having to modify it. This could potentially make upgrading easier when the pants script itself changes.jolly-midnight-72759
09/30/2020, 2:51 PMaloof-angle-91616
09/30/2020, 2:54 PMjolly-midnight-72759
09/30/2020, 2:54 PMjolly-midnight-72759
09/30/2020, 2:59 PMv2 script. Duh. I can just modify that to do what I want. and I think that's a more 👖 way to go for the community. (i.e. I think I can get developers onboard with running v2 blah when we make the jump to 2.0.0).
Putting this kind of logic into the official pants script will just increase its complexity. Having a community policy of supporting wrapping the pants script solves the issue.aloof-angle-91616
09/30/2020, 3:03 PMaloof-angle-91616
09/30/2020, 3:03 PM