aloof-angle-91616
04/17/2019, 7:07 PMhundreds-father-404
04/17/2019, 7:08 PMaloof-angle-91616
04/17/2019, 7:12 PMaloof-angle-91616
04/17/2019, 7:12 PMaloof-angle-91616
04/17/2019, 7:12 PMwitty-crayon-22786
04/17/2019, 7:13 PMwitty-crayon-22786
04/17/2019, 11:32 PMaloof-angle-91616
04/17/2019, 11:34 PMPEX_VERBOSE=9 has produced no clues yet when i run it through travisaloof-angle-91616
04/17/2019, 11:34 PMaloof-angle-91616
04/17/2019, 11:34 PMwitty-crayon-22786
04/17/2019, 11:35 PMaloof-angle-91616
04/17/2019, 11:35 PMwitty-crayon-22786
04/17/2019, 11:35 PMwitty-crayon-22786
04/17/2019, 11:35 PMaloof-angle-91616
04/17/2019, 11:36 PMset -e is on, so that shouldn't happen, but this is being run inside a process output substitution with $(), and also one instance of it is piping its output so set -o pipefail needed to be turned on. goal right now is just to get the script to fail when the resolution failswitty-crayon-22786
04/17/2019, 11:53 PMaloof-angle-91616
04/18/2019, 1:56 AMpex: creating PythonIdentity from id string: cp cp36m 36 3 6 8
pex: creating PythonIdentity from id string: cp cp36m 36 3 6 8
pex: creating PythonIdentity from id string: cp cp36m 36 3 6 8
pex: creating PythonIdentity from id string: cp cp36m 36 3 6 8
pex: creating PythonIdentity from id string: cp cp36m 36 3 6 8
pex: creating PythonIdentity from id string: cp cp27m 27 2 7 12
pex: creating PythonIdentity from id string: cp cp27m 27 2 7 12
pex: creating PythonIdentity from id string: cp cp27m 27 2 7 12
pex: creating PythonIdentity from id string: cp cp27m 27 2 7 10
pex: Could not identify /usr/bin/python2.6: received exit code 1 during execution of `['/usr/bin/python2.6', '-sE']` while trying to execute `['/usr/bin/python2.6', '-sE']`
pex: creating PythonIdentity from id string: cp cp27m 27 2 7 10
pex: Constraints on interpreters: ['>=3.4,<4', '==2.7.*'], Matching Interpreter: /Users/travis/.pants_pyenv/versions/3.6.8/bin/python3.6
pex: Constraints on interpreters: ['>=3.4,<4', '==2.7.*'], Matching Interpreter: /usr/bin/python
pex: Constraints on interpreters: ['>=3.4,<4', '==2.7.*'], Matching Interpreter: /Users/travis/.pants_pyenv/shims/python
pex: Constraints on interpreters: ['>=3.4,<4', '==2.7.*'], Matching Interpreter: /usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/bin/python2.7
pex: Selecting runtime interpreter based on pexrc: 999.7ms
pex: Re-executing: cmdline="['/usr/bin/python', '/var/folders/my/m6ynh3bn6tq06h7xr3js0z7r0000gn/T/build_pex.XXXXX.x8lsnftO/pex', 'future==0.17.1', 'beautifulsoup4>=4.6.0,<4.7', "configparser==3.7.1 ; python_version<'3'", "subprocess32==3.2.7 ; python_version<'3'", '--', '/Users/travis/build/pantsbuild/pants/src/python/pants/releases/packages.py', '--py3', 'build_and_print', '1.16.0.dev1+gitebd34c13']", sys.executable="/Users/travis/.pants_pyenv/versions/3.6.8/bin/python", PEX_PYTHON="None", PEX_PYTHON_PATH="None", COMPATIBILITY_CONSTRAINTS="['>=3.4,<4', '==2.7.*']"
here it says "re-executing" and then explicitly uses /usr/bin/python instead of e.g. the pyenv one at /Users/travis/.pants_pyenv/versions/3.6.8/bin/python3.6. so i'm gonna look into how pex figures out what to "re-execute"hundreds-father-404
04/18/2019, 2:01 AMfuture requirement in release.sh from here https://github.com/pantsbuild/pants/blob/master/build-support/bin/release.sh#L104? That’s new to me - didn’t think about that and assumed the issue was the wheel used when running ci.sh -b.aloof-angle-91616
04/18/2019, 2:01 AMaloof-angle-91616
04/18/2019, 2:02 AMhundreds-father-404
04/18/2019, 2:07 AMsys.executable in the valid interpreters if PEX_PYTHON and PEX_PYTHON_PATH are left off. It seems maybe resolution is being inconsistent because now there are multiple interpreters to choose from?aloof-angle-91616
04/18/2019, 2:10 AMhundreds-father-404
04/18/2019, 2:10 AMPEX_PYTHON_PATH for OSX UCS4, and it’s still failing to resolve future. Worth checking though.hundreds-father-404
04/18/2019, 2:13 AMaloof-angle-91616
04/18/2019, 2:22 AMaloof-angle-91616
04/18/2019, 2:22 AMhundreds-father-404
04/18/2019, 2:25 AMrelease.sh to your clone here: https://github.com/pantsbuild/pants/blob/master/build-support/bin/release.sh#L91. Although I doubt that would work because this is pointing to the Pex binary we release, not a source code file
Usually we’ve identified what the issue is through reasoning, upstream it to Pex, re-release Pex, pull it down to Pants, and repeat if it didn’t actually workwitty-crayon-22786
04/18/2019, 2:32 AMmy-pex-version==1.6.6+specialest-1), you can load it via --python-repos-repos=$somediraloof-angle-91616
04/18/2019, 3:51 AMenough-analyst-54434
04/18/2019, 7:35 PMwitty-crayon-22786
04/18/2019, 7:58 PMaloof-angle-91616
04/18/2019, 8:10 PMset -x and PEX_VERBOSE=9) -- i've been pushing to https://github.com/pantsbuild/pants/tree/try-fix-silent-osx-wheel-build-error-for-1.16.x at pantsbuild/pants instead of making a PR yet for no particular reason.
i had the one hunch that putting PythonInterpreter.get() first in the set of interpreters to match when PEX_PYTHON_PATH was unset (the change from pex 1.6.6 that @hundreds-father-404 pointed out) might have been causing pex to use /usr/bin/python instead of our pyenv python, and switched that around in https://github.com/cosmicexplorer/pex/tree/put-self-interpreter-at-end-of-path, but that didn't fix the issue (see travis link).
using that pex branch did however finally make the release script fail (because despite having set -e, it refuses to exit when future==0.17.1 resolution fails), but that's only because the other command to find the wheel failed, so that error is unrelated to the original issue.
it would be super useful if we could understand why failing to resolve future==0.17.1 doesn't cause the release script to exit (which is why this was allowed to start failing in the first place), and if not that (since i didn't have any luck with that) why the resolution is failing (i am under the impression this could be because we're resolving requirements for a different interpreter than we're expecting to, but can't figure out which).enough-analyst-54434
04/18/2019, 8:16 PMaloof-angle-91616
04/18/2019, 8:34 PMenough-analyst-54434
04/19/2019, 2:13 AMlimited-country-20626
04/19/2019, 7:33 PMenough-analyst-54434
04/19/2019, 7:33 PMlimited-country-20626
04/19/2019, 7:34 PMlimited-country-20626
04/19/2019, 7:35 PMenough-analyst-54434
04/19/2019, 7:35 PMenough-analyst-54434
04/19/2019, 7:35 PMlimited-country-20626
04/19/2019, 7:35 PMlimited-country-20626
04/19/2019, 7:36 PMenough-analyst-54434
04/19/2019, 7:36 PMlimited-country-20626
04/19/2019, 7:36 PMenough-analyst-54434
04/19/2019, 7:36 PMaloof-angle-91616
04/19/2019, 7:36 PM-vvvvvvvvv being more verbose than PEX_VERBOSE=9 threw me off a bitlimited-country-20626
04/19/2019, 7:36 PMlimited-country-20626
04/19/2019, 7:37 PMenough-analyst-54434
04/19/2019, 7:37 PMlimited-country-20626
04/19/2019, 7:37 PMenough-analyst-54434
04/19/2019, 7:37 PMenough-analyst-54434
04/19/2019, 7:37 PMlimited-country-20626
04/19/2019, 7:37 PMenough-analyst-54434
04/19/2019, 7:38 PMaloof-angle-91616
04/19/2019, 7:38 PMaloof-angle-91616
04/19/2019, 7:38 PMlimited-country-20626
04/19/2019, 7:40 PMlimited-country-20626
04/19/2019, 7:40 PMlimited-country-20626
04/19/2019, 7:40 PMlimited-country-20626
04/19/2019, 7:41 PM# Needed for multiproc C+= is some fucked up way
# explanation here and elsewhere: <https://github.com/ansible/ansible/issues/34056>
export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YESlimited-country-20626
04/19/2019, 7:41 PMenough-analyst-54434
04/19/2019, 7:43 PMset -e doesn't work like you might expect inside function bodies, where you must track exit codes yourself and exit if you want that.enough-analyst-54434
04/19/2019, 7:46 PMset -e doesn't change this. If you have { true; false; true; } all three execute even if set -e is in effect and the funtion return code is 0.aloof-angle-91616
04/19/2019, 7:47 PMaloof-angle-91616
04/19/2019, 7:48 PMenough-analyst-54434
04/19/2019, 7:49 PMaloof-angle-91616
04/19/2019, 7:50 PMfunction run_pex() {
# TODO: Cache this in case we run pex multiple times
(
PEX_VERSION="$(requirement pex | sed -e "s|pex==||")"
pexdir="$(mktemp -d -t build_pex.XXXXX)"
trap "rm -rf ${pexdir}" EXIT
pex="${pexdir}/pex"
curl -sSL "${PEX_DOWNLOAD_PREFIX}/v${PEX_VERSION}/pex" > "${pex}"
chmod +x "${pex}"
"${pex}" "$@"
)
}enough-analyst-54434
04/19/2019, 7:50 PMwitty-crayon-22786
04/19/2019, 7:51 PMaloof-angle-91616
04/19/2019, 7:51 PMset -e behavioraloof-angle-91616
04/19/2019, 7:52 PMenough-analyst-54434
04/19/2019, 7:52 PMaloof-angle-91616
04/19/2019, 7:53 PMenough-analyst-54434
04/19/2019, 7:54 PMi was thinking like how there are the parens wrapping the function body hereThose are actually superfluous. You have to re-dclare
set -e inside those parens to get the desired effect. set -e does not propagate to subshells.aloof-angle-91616
04/19/2019, 7:55 PMexit 1 inside of it to exit early without killing the whole scriptenough-analyst-54434
04/19/2019, 7:55 PMaloof-angle-91616
04/19/2019, 7:55 PMaloof-angle-91616
04/20/2019, 1:07 AM