Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python_awslambda can include distributions incompatible with explicit complete_platforms #17621

Closed
huonw opened this issue Nov 22, 2022 · 6 comments · Fixed by #17637
Closed
Assignees
Labels

Comments

@huonw
Copy link
Contributor

huonw commented Nov 22, 2022

Describe the bug

We have a Python lambda built via python_awslambda (very convenient, thanks!) plus a complete platform JSON that we got by running pex3 interpreter inspect --markers --tags from within the Lambda environment. This environment uses tags up to "cp39-cp39-manylinux_2_26_x86_64".

When building on certain Linux systems, it seems that pants will happily include a manylinux_2_28 wheel (NB. 28 vs 26), which isn't compatible with the lambda environment. Pex thus fails at start-up:

...
pex: Unresolved requirements:
pex:   - cryptography>=3.4.0; extra == "cryptography"
pex: Distributions contained within this pex:
...
pex:   - cryptography-38.0.3-cp36-abi3-manylinux_2_28_x86_64.whl
...
Failed to import module 'lambdex_handler': Failed to resolve requirements from PEX environment @ /var/task.
Needed cp39-cp39-manylinux_2_26_x86_64 compatible dependencies for:
 1: cryptography>=3.4.0; extra == "cryptography"
    Required by:
      python-jose 3.3.0
    But this pex had no ProjectName(raw='cryptography', normalized='cryptography') distributions.
...

I've tried to create a reproducer in https://gist.github.com/huonw/504ef2a5d44efdc2c2df290c0ce5df16. This uses a complete platform from the Python 3.9 lambda environment, with a dependency that doesn't have any matching wheels. (Unfortunately due to https://pantsbuild.slack.com/archives/C046T6T9U/p1669150590877779, I cannot offer scripted commands that definitely reproduce it, because I cannot run pants under docker on my machine at the moment.)

The following shell snippet loads the repo, and packages the lambda and checks what is included:

git clone https://gist.github.com/504ef2a5d44efdc2c2df290c0ce5df16.git && cd 504ef2a5d44efdc2c2df290c0ce5df16 && ./pants package :lambda && unzip -p dist/lambda.zip PEX-INFO | jq .

The distributions object should include a cryptography distribution that's compatible with the complete platforms, e.g. cryptography-38.0.3-cp36-abi3-manylinux_2_24_x86_64.whl.

  1. ✅ it does on macOS
  2. ✅ it does on Linux with Python version != 3.9
  3. ❌ it doesn't on (some) Linux on Python version 3.9 (it uses cryptography-38.0.3-cp36-abi3-manylinux_2_28_x86_64.whl). The specific environment is Github Actions ubuntu-latest with actions/setup-python@v4 used with python-version: 3.9. Complete platform in "Additional info" below.

I suspect the general behaviour here is that if the host system is close enough to the lambda environment, then

# When we're executing Pex on Linux, allow a local interpreter to be resolved if
# available and matching the AMI platform.
"--resolve-local-platforms",
means that the build will effectively ignore the exact complete_platform JSON files, and use the host system's one. If the host system has newer glibc versions, this might select an incorrect wheel. In this case, the lambda complete platform is CPython 3.9, and thus running with the same Python version hits this issue.

Pants version
2.14.0

OS
Linux

Additional info
Complete platform of failing environment as reported by pex:

{"path": "/opt/hostedtoolcache/Python/3.9.15/x64/bin/python3.9", "compatible_tags": ["cp39-cp39-manylinux_2_31_x86_64", "cp39-cp39-manylinux_2_30_x86_64", "cp39-cp39-manylinux_2_29_x86_64", "cp39-cp39-manylinux_2_28_x86_64", "cp39-cp39-manylinux_2_27_x86_64", "cp39-cp39-manylinux_2_26_x86_64", "cp39-cp39-manylinux_2_25_x86_64", "cp39-cp39-manylinux_2_24_x86_64", "cp39-cp39-manylinux_2_23_x86_64", "cp39-cp39-manylinux_2_22_x86_64", "cp39-cp39-manylinux_2_21_x86_64", "cp39-cp39-manylinux_2_20_x86_64", "cp39-cp39-manylinux_2_19_x86_64", "cp39-cp39-manylinux_2_18_x86_64", "cp39-cp39-manylinux_2_17_x86_64", "cp39-cp39-manylinux2014_x86_64", "cp39-cp39-manylinux_2_16_x86_64", "cp39-cp39-manylinux_2_15_x86_64", "cp39-cp39-manylinux_2_14_x86_64", "cp39-cp39-manylinux_2_13_x86_64", "cp39-cp39-manylinux_2_12_x86_64", "cp39-cp39-manylinux2010_x86_64", "cp39-cp39-manylinux_2_11_x86_64", "cp39-cp39-manylinux_2_10_x86_64", "cp39-cp39-manylinux_2_9_x86_64", "cp39-cp39-manylinux_2_8_x86_64", "cp39-cp39-manylinux_2_7_x86_64", "cp39-cp39-manylinux_2_6_x86_64", "cp39-cp39-manylinux_2_5_x86_64", "cp39-cp39-manylinux1_x86_64", "cp39-cp39-linux_x86_64", "cp39-abi3-manylinux_2_31_x86_64", "cp39-abi3-manylinux_2_30_x86_64", "cp39-abi3-manylinux_2_29_x86_64", "cp39-abi3-manylinux_2_28_x86_64", "cp39-abi3-manylinux_2_27_x86_64", "cp39-abi3-manylinux_2_26_x86_64", "cp39-abi3-manylinux_2_25_x86_64", "cp39-abi3-manylinux_2_24_x86_64", "cp39-abi3-manylinux_2_23_x86_64", "cp39-abi3-manylinux_2_22_x86_64", "cp39-abi3-manylinux_2_21_x86_64", "cp39-abi3-manylinux_2_20_x86_64", "cp39-abi3-manylinux_2_19_x86_64", "cp39-abi3-manylinux_2_18_x86_64", "cp39-abi3-manylinux_2_17_x86_64", "cp39-abi3-manylinux2014_x86_64", "cp39-abi3-manylinux_2_16_x86_64", "cp39-abi3-manylinux_2_15_x86_64", "cp39-abi3-manylinux_2_14_x86_64", "cp39-abi3-manylinux_2_13_x86_64", "cp39-abi3-manylinux_2_12_x86_64", "cp39-abi3-manylinux2010_x86_64", "cp39-abi3-manylinux_2_11_x86_64", "cp39-abi3-manylinux_2_10_x86_64", "cp39-abi3-manylinux_2_9_x86_64", "cp39-abi3-manylinux_2_8_x86_64", "cp39-abi3-manylinux_2_7_x86_64", "cp39-abi3-manylinux_2_6_x86_64", "cp39-abi3-manylinux_2_5_x86_64", "cp39-abi3-manylinux1_x86_64", "cp39-abi3-linux_x86_64", "cp39-none-manylinux_2_31_x86_64", "cp39-none-manylinux_2_30_x86_64", "cp39-none-manylinux_2_29_x86_64", "cp39-none-manylinux_2_28_x86_64", "cp39-none-manylinux_2_27_x86_64", "cp39-none-manylinux_2_26_x86_64", "cp39-none-manylinux_2_25_x86_64", "cp39-none-manylinux_2_24_x86_64", "cp39-none-manylinux_2_23_x86_64", "cp39-none-manylinux_2_22_x86_64", "cp39-none-manylinux_2_21_x86_64", "cp39-none-manylinux_2_20_x86_64", "cp39-none-manylinux_2_19_x86_64", "cp39-none-manylinux_2_18_x86_64", "cp39-none-manylinux_2_17_x86_64", "cp39-none-manylinux2014_x86_64", "cp39-none-manylinux_2_16_x86_64", "cp39-none-manylinux_2_15_x86_64", "cp39-none-manylinux_2_14_x86_64", "cp39-none-manylinux_2_13_x86_64", "cp39-none-manylinux_2_12_x86_64", "cp39-none-manylinux2010_x86_64", "cp39-none-manylinux_2_11_x86_64", "cp39-none-manylinux_2_10_x86_64", "cp39-none-manylinux_2_9_x86_64", "cp39-none-manylinux_2_8_x86_64", "cp39-none-manylinux_2_7_x86_64", "cp39-none-manylinux_2_6_x86_64", "cp39-none-manylinux_2_5_x86_64", "cp39-none-manylinux1_x86_64", "cp39-none-linux_x86_64", "cp38-abi3-manylinux_2_31_x86_64", "cp38-abi3-manylinux_2_30_x86_64", "cp38-abi3-manylinux_2_29_x86_64", "cp38-abi3-manylinux_2_28_x86_64", "cp38-abi3-manylinux_2_27_x86_64", "cp38-abi3-manylinux_2_26_x86_64", "cp38-abi3-manylinux_2_25_x86_64", "cp38-abi3-manylinux_2_24_x86_64", "cp38-abi3-manylinux_2_23_x86_64", "cp38-abi3-manylinux_2_22_x86_64", "cp38-abi3-manylinux_2_21_x86_64", "cp38-abi3-manylinux_2_20_x86_64", "cp38-abi3-manylinux_2_19_x86_64", "cp38-abi3-manylinux_2_18_x86_64", "cp38-abi3-manylinux_2_17_x86_64", "cp38-abi3-manylinux2014_x86_64", "cp38-abi3-manylinux_2_16_x86_64", "cp38-abi3-manylinux_2_15_x86_64", "cp38-abi3-manylinux_2_14_x86_64", "cp38-abi3-manylinux_2_13_x86_64", "cp38-abi3-manylinux_2_12_x86_64", "cp38-abi3-manylinux2010_x86_64", "cp38-abi3-manylinux_2_11_x86_64", "cp38-abi3-manylinux_2_10_x86_64", "cp38-abi3-manylinux_2_9_x86_64", "cp38-abi3-manylinux_2_8_x86_64", "cp38-abi3-manylinux_2_7_x86_64", "cp38-abi3-manylinux_2_6_x86_64", "cp38-abi3-manylinux_2_5_x86_64", "cp38-abi3-manylinux1_x86_64", "cp38-abi3-linux_x86_64", "cp37-abi3-manylinux_2_31_x86_64", "cp37-abi3-manylinux_2_30_x86_64", "cp37-abi3-manylinux_2_29_x86_64", "cp37-abi3-manylinux_2_28_x86_64", "cp37-abi3-manylinux_2_27_x86_64", "cp37-abi3-manylinux_2_26_x86_64", "cp37-abi3-manylinux_2_25_x86_64", "cp37-abi3-manylinux_2_24_x86_64", "cp37-abi3-manylinux_2_23_x86_64", "cp37-abi3-manylinux_2_22_x86_64", "cp37-abi3-manylinux_2_21_x86_64", "cp37-abi3-manylinux_2_20_x86_64", "cp37-abi3-manylinux_2_19_x86_64", "cp37-abi3-manylinux_2_18_x86_64", "cp37-abi3-manylinux_2_17_x86_64", "cp37-abi3-manylinux2014_x86_64", "cp37-abi3-manylinux_2_16_x86_64", "cp37-abi3-manylinux_2_15_x86_64", "cp37-abi3-manylinux_2_14_x86_64", "cp37-abi3-manylinux_2_13_x86_64", "cp37-abi3-manylinux_2_12_x86_64", "cp37-abi3-manylinux2010_x86_64", "cp37-abi3-manylinux_2_11_x86_64", "cp37-abi3-manylinux_2_10_x86_64", "cp37-abi3-manylinux_2_9_x86_64", "cp37-abi3-manylinux_2_8_x86_64", "cp37-abi3-manylinux_2_7_x86_64", "cp37-abi3-manylinux_2_6_x86_64", "cp37-abi3-manylinux_2_5_x86_64", "cp37-abi3-manylinux1_x86_64", "cp37-abi3-linux_x86_64", "cp36-abi3-manylinux_2_31_x86_64", "cp36-abi3-manylinux_2_30_x86_64", "cp36-abi3-manylinux_2_29_x86_64", "cp36-abi3-manylinux_2_28_x86_64", "cp36-abi3-manylinux_2_27_x86_64", "cp36-abi3-manylinux_2_26_x86_64", "cp36-abi3-manylinux_2_25_x86_64", "cp36-abi3-manylinux_2_24_x86_64", "cp36-abi3-manylinux_2_23_x86_64", "cp36-abi3-manylinux_2_22_x86_64", "cp36-abi3-manylinux_2_21_x86_64", "cp36-abi3-manylinux_2_20_x86_64", "cp36-abi3-manylinux_2_19_x86_64", "cp36-abi3-manylinux_2_18_x86_64", "cp36-abi3-manylinux_2_17_x86_64", "cp36-abi3-manylinux2014_x86_64", "cp36-abi3-manylinux_2_16_x86_64", "cp36-abi3-manylinux_2_15_x86_64", "cp36-abi3-manylinux_2_14_x86_64", "cp36-abi3-manylinux_2_13_x86_64", "cp36-abi3-manylinux_2_12_x86_64", "cp36-abi3-manylinux2010_x86_64", "cp36-abi3-manylinux_2_11_x86_64", "cp36-abi3-manylinux_2_10_x86_64", "cp36-abi3-manylinux_2_9_x86_64", "cp36-abi3-manylinux_2_8_x86_64", "cp36-abi3-manylinux_2_7_x86_64", "cp36-abi3-manylinux_2_6_x86_64", "cp36-abi3-manylinux_2_5_x86_64", "cp36-abi3-manylinux1_x86_64", "cp36-abi3-linux_x86_64", "cp35-abi3-manylinux_2_31_x86_64", "cp35-abi3-manylinux_2_30_x86_64", "cp35-abi3-manylinux_2_29_x86_64", "cp35-abi3-manylinux_2_28_x86_64", "cp35-abi3-manylinux_2_27_x86_64", "cp35-abi3-manylinux_2_26_x86_64", "cp35-abi3-manylinux_2_25_x86_64", "cp35-abi3-manylinux_2_24_x86_64", "cp35-abi3-manylinux_2_23_x86_64", "cp35-abi3-manylinux_2_22_x86_64", "cp35-abi3-manylinux_2_21_x86_64", "cp35-abi3-manylinux_2_20_x86_64", "cp35-abi3-manylinux_2_19_x86_64", "cp35-abi3-manylinux_2_18_x86_64", "cp35-abi3-manylinux_2_17_x86_64", "cp35-abi3-manylinux2014_x86_64", "cp35-abi3-manylinux_2_16_x86_64", "cp35-abi3-manylinux_2_15_x86_64", "cp35-abi3-manylinux_2_14_x86_64", "cp35-abi3-manylinux_2_13_x86_64", "cp35-abi3-manylinux_2_12_x86_64", "cp35-abi3-manylinux2010_x86_64", "cp35-abi3-manylinux_2_11_x86_64", "cp35-abi3-manylinux_2_10_x86_64", "cp35-abi3-manylinux_2_9_x86_64", "cp35-abi3-manylinux_2_8_x86_64", "cp35-abi3-manylinux_2_7_x86_64", "cp35-abi3-manylinux_2_6_x86_64", "cp35-abi3-manylinux_2_5_x86_64", "cp35-abi3-manylinux1_x86_64", "cp35-abi3-linux_x86_64", "cp34-abi3-manylinux_2_31_x86_64", "cp34-abi3-manylinux_2_30_x86_64", "cp34-abi3-manylinux_2_29_x86_64", "cp34-abi3-manylinux_2_28_x86_64", "cp34-abi3-manylinux_2_27_x86_64", "cp34-abi3-manylinux_2_26_x86_64", "cp34-abi3-manylinux_2_25_x86_64", "cp34-abi3-manylinux_2_24_x86_64", "cp34-abi3-manylinux_2_23_x86_64", "cp34-abi3-manylinux_2_22_x86_64", "cp34-abi3-manylinux_2_21_x86_64", "cp34-abi3-manylinux_2_20_x86_64", "cp34-abi3-manylinux_2_19_x86_64", "cp34-abi3-manylinux_2_18_x86_64", "cp34-abi3-manylinux_2_17_x86_64", "cp34-abi3-manylinux2014_x86_64", "cp34-abi3-manylinux_2_16_x86_64", "cp34-abi3-manylinux_2_15_x86_64", "cp34-abi3-manylinux_2_14_x86_64", "cp34-abi3-manylinux_2_13_x86_64", "cp34-abi3-manylinux_2_12_x86_64", "cp34-abi3-manylinux2010_x86_64", "cp34-abi3-manylinux_2_11_x86_64", "cp34-abi3-manylinux_2_10_x86_64", "cp34-abi3-manylinux_2_9_x86_64", "cp34-abi3-manylinux_2_8_x86_64", "cp34-abi3-manylinux_2_7_x86_64", "cp34-abi3-manylinux_2_6_x86_64", "cp34-abi3-manylinux_2_5_x86_64", "cp34-abi3-manylinux1_x86_64", "cp34-abi3-linux_x86_64", "cp33-abi3-manylinux_2_31_x86_64", "cp33-abi3-manylinux_2_30_x86_64", "cp33-abi3-manylinux_2_29_x86_64", "cp33-abi3-manylinux_2_28_x86_64", "cp33-abi3-manylinux_2_27_x86_64", "cp33-abi3-manylinux_2_26_x86_64", "cp33-abi3-manylinux_2_25_x86_64", "cp33-abi3-manylinux_2_24_x86_64", "cp33-abi3-manylinux_2_23_x86_64", "cp33-abi3-manylinux_2_22_x86_64", "cp33-abi3-manylinux_2_21_x86_64", "cp33-abi3-manylinux_2_20_x86_64", "cp33-abi3-manylinux_2_19_x86_64", "cp33-abi3-manylinux_2_18_x86_64", "cp33-abi3-manylinux_2_17_x86_64", "cp33-abi3-manylinux2014_x86_64", "cp33-abi3-manylinux_2_16_x86_64", "cp33-abi3-manylinux_2_15_x86_64", "cp33-abi3-manylinux_2_14_x86_64", "cp33-abi3-manylinux_2_13_x86_64", "cp33-abi3-manylinux_2_12_x86_64", "cp33-abi3-manylinux2010_x86_64", "cp33-abi3-manylinux_2_11_x86_64", "cp33-abi3-manylinux_2_10_x86_64", "cp33-abi3-manylinux_2_9_x86_64", "cp33-abi3-manylinux_2_8_x86_64", "cp33-abi3-manylinux_2_7_x86_64", "cp33-abi3-manylinux_2_6_x86_64", "cp33-abi3-manylinux_2_5_x86_64", "cp33-abi3-manylinux1_x86_64", "cp33-abi3-linux_x86_64", "cp32-abi3-manylinux_2_31_x86_64", "cp32-abi3-manylinux_2_30_x86_64", "cp32-abi3-manylinux_2_29_x86_64", "cp32-abi3-manylinux_2_28_x86_64", "cp32-abi3-manylinux_2_27_x86_64", "cp32-abi3-manylinux_2_26_x86_64", "cp32-abi3-manylinux_2_25_x86_64", "cp32-abi3-manylinux_2_24_x86_64", "cp32-abi3-manylinux_2_23_x86_64", "cp32-abi3-manylinux_2_22_x86_64", "cp32-abi3-manylinux_2_21_x86_64", "cp32-abi3-manylinux_2_20_x86_64", "cp32-abi3-manylinux_2_19_x86_64", "cp32-abi3-manylinux_2_18_x86_64", "cp32-abi3-manylinux_2_17_x86_64", "cp32-abi3-manylinux2014_x86_64", "cp32-abi3-manylinux_2_16_x86_64", "cp32-abi3-manylinux_2_15_x86_64", "cp32-abi3-manylinux_2_14_x86_64", "cp32-abi3-manylinux_2_13_x86_64", "cp32-abi3-manylinux_2_12_x86_64", "cp32-abi3-manylinux2010_x86_64", "cp32-abi3-manylinux_2_11_x86_64", "cp32-abi3-manylinux_2_10_x86_64", "cp32-abi3-manylinux_2_9_x86_64", "cp32-abi3-manylinux_2_8_x86_64", "cp32-abi3-manylinux_2_7_x86_64", "cp32-abi3-manylinux_2_6_x86_64", "cp32-abi3-manylinux_2_5_x86_64", "cp32-abi3-manylinux1_x86_64", "cp32-abi3-linux_x86_64", "py39-none-manylinux_2_31_x86_64", "py39-none-manylinux_2_30_x86_64", "py39-none-manylinux_2_29_x86_64", "py39-none-manylinux_2_28_x86_64", "py39-none-manylinux_2_27_x86_64", "py39-none-manylinux_2_26_x86_64", "py39-none-manylinux_2_25_x86_64", "py39-none-manylinux_2_24_x86_64", "py39-none-manylinux_2_23_x86_64", "py39-none-manylinux_2_22_x86_64", "py39-none-manylinux_2_21_x86_64", "py39-none-manylinux_2_20_x86_64", "py39-none-manylinux_2_19_x86_64", "py39-none-manylinux_2_18_x86_64", "py39-none-manylinux_2_17_x86_64", "py39-none-manylinux2014_x86_64", "py39-none-manylinux_2_16_x86_64", "py39-none-manylinux_2_15_x86_64", "py39-none-manylinux_2_14_x86_64", "py39-none-manylinux_2_13_x86_64", "py39-none-manylinux_2_12_x86_64", "py39-none-manylinux2010_x86_64", "py39-none-manylinux_2_11_x86_64", "py39-none-manylinux_2_10_x86_64", "py39-none-manylinux_2_9_x86_64", "py39-none-manylinux_2_8_x86_64", "py39-none-manylinux_2_7_x86_64", "py39-none-manylinux_2_6_x86_64", "py39-none-manylinux_2_5_x86_64", "py39-none-manylinux1_x86_64", "py39-none-linux_x86_64", "py3-none-manylinux_2_31_x86_64", "py3-none-manylinux_2_30_x86_64", "py3-none-manylinux_2_29_x86_64", "py3-none-manylinux_2_28_x86_64", "py3-none-manylinux_2_27_x86_64", "py3-none-manylinux_2_26_x86_64", "py3-none-manylinux_2_25_x86_64", "py3-none-manylinux_2_24_x86_64", "py3-none-manylinux_2_23_x86_64", "py3-none-manylinux_2_22_x86_64", "py3-none-manylinux_2_21_x86_64", "py3-none-manylinux_2_20_x86_64", "py3-none-manylinux_2_19_x86_64", "py3-none-manylinux_2_18_x86_64", "py3-none-manylinux_2_17_x86_64", "py3-none-manylinux2014_x86_64", "py3-none-manylinux_2_16_x86_64", "py3-none-manylinux_2_15_x86_64", "py3-none-manylinux_2_14_x86_64", "py3-none-manylinux_2_13_x86_64", "py3-none-manylinux_2_12_x86_64", "py3-none-manylinux2010_x86_64", "py3-none-manylinux_2_11_x86_64", "py3-none-manylinux_2_10_x86_64", "py3-none-manylinux_2_9_x86_64", "py3-none-manylinux_2_8_x86_64", "py3-none-manylinux_2_7_x86_64", "py3-none-manylinux_2_6_x86_64", "py3-none-manylinux_2_5_x86_64", "py3-none-manylinux1_x86_64", "py3-none-linux_x86_64", "py38-none-manylinux_2_31_x86_64", "py38-none-manylinux_2_30_x86_64", "py38-none-manylinux_2_29_x86_64", "py38-none-manylinux_2_28_x86_64", "py38-none-manylinux_2_27_x86_64", "py38-none-manylinux_2_26_x86_64", "py38-none-manylinux_2_25_x86_64", "py38-none-manylinux_2_24_x86_64", "py38-none-manylinux_2_23_x86_64", "py38-none-manylinux_2_22_x86_64", "py38-none-manylinux_2_21_x86_64", "py38-none-manylinux_2_20_x86_64", "py38-none-manylinux_2_19_x86_64", "py38-none-manylinux_2_18_x86_64", "py38-none-manylinux_2_17_x86_64", "py38-none-manylinux2014_x86_64", "py38-none-manylinux_2_16_x86_64", "py38-none-manylinux_2_15_x86_64", "py38-none-manylinux_2_14_x86_64", "py38-none-manylinux_2_13_x86_64", "py38-none-manylinux_2_12_x86_64", "py38-none-manylinux2010_x86_64", "py38-none-manylinux_2_11_x86_64", "py38-none-manylinux_2_10_x86_64", "py38-none-manylinux_2_9_x86_64", "py38-none-manylinux_2_8_x86_64", "py38-none-manylinux_2_7_x86_64", "py38-none-manylinux_2_6_x86_64", "py38-none-manylinux_2_5_x86_64", "py38-none-manylinux1_x86_64", "py38-none-linux_x86_64", "py37-none-manylinux_2_31_x86_64", "py37-none-manylinux_2_30_x86_64", "py37-none-manylinux_2_29_x86_64", "py37-none-manylinux_2_28_x86_64", "py37-none-manylinux_2_27_x86_64", "py37-none-manylinux_2_26_x86_64", "py37-none-manylinux_2_25_x86_64", "py37-none-manylinux_2_24_x86_64", "py37-none-manylinux_2_23_x86_64", "py37-none-manylinux_2_22_x86_64", "py37-none-manylinux_2_21_x86_64", "py37-none-manylinux_2_20_x86_64", "py37-none-manylinux_2_19_x86_64", "py37-none-manylinux_2_18_x86_64", "py37-none-manylinux_2_17_x86_64", "py37-none-manylinux2014_x86_64", "py37-none-manylinux_2_16_x86_64", "py37-none-manylinux_2_15_x86_64", "py37-none-manylinux_2_14_x86_64", "py37-none-manylinux_2_13_x86_64", "py37-none-manylinux_2_12_x86_64", "py37-none-manylinux2010_x86_64", "py37-none-manylinux_2_11_x86_64", "py37-none-manylinux_2_10_x86_64", "py37-none-manylinux_2_9_x86_64", "py37-none-manylinux_2_8_x86_64", "py37-none-manylinux_2_7_x86_64", "py37-none-manylinux_2_6_x86_64", "py37-none-manylinux_2_5_x86_64", "py37-none-manylinux1_x86_64", "py37-none-linux_x86_64", "py36-none-manylinux_2_31_x86_64", "py36-none-manylinux_2_30_x86_64", "py36-none-manylinux_2_29_x86_64", "py36-none-manylinux_2_28_x86_64", "py36-none-manylinux_2_27_x86_64", "py36-none-manylinux_2_26_x86_64", "py36-none-manylinux_2_25_x86_64", "py36-none-manylinux_2_24_x86_64", "py36-none-manylinux_2_23_x86_64", "py36-none-manylinux_2_22_x86_64", "py36-none-manylinux_2_21_x86_64", "py36-none-manylinux_2_20_x86_64", "py36-none-manylinux_2_19_x86_64", "py36-none-manylinux_2_18_x86_64", "py36-none-manylinux_2_17_x86_64", "py36-none-manylinux2014_x86_64", "py36-none-manylinux_2_16_x86_64", "py36-none-manylinux_2_15_x86_64", "py36-none-manylinux_2_14_x86_64", "py36-none-manylinux_2_13_x86_64", "py36-none-manylinux_2_12_x86_64", "py36-none-manylinux2010_x86_64", "py36-none-manylinux_2_11_x86_64", "py36-none-manylinux_2_10_x86_64", "py36-none-manylinux_2_9_x86_64", "py36-none-manylinux_2_8_x86_64", "py36-none-manylinux_2_7_x86_64", "py36-none-manylinux_2_6_x86_64", "py36-none-manylinux_2_5_x86_64", "py36-none-manylinux1_x86_64", "py36-none-linux_x86_64", "py35-none-manylinux_2_31_x86_64", "py35-none-manylinux_2_30_x86_64", "py35-none-manylinux_2_29_x86_64", "py35-none-manylinux_2_28_x86_64", "py35-none-manylinux_2_27_x86_64", "py35-none-manylinux_2_26_x86_64", "py35-none-manylinux_2_25_x86_64", "py35-none-manylinux_2_24_x86_64", "py35-none-manylinux_2_23_x86_64", "py35-none-manylinux_2_22_x86_64", "py35-none-manylinux_2_21_x86_64", "py35-none-manylinux_2_20_x86_64", "py35-none-manylinux_2_19_x86_64", "py35-none-manylinux_2_18_x86_64", "py35-none-manylinux_2_17_x86_64", "py35-none-manylinux2014_x86_64", "py35-none-manylinux_2_16_x86_64", "py35-none-manylinux_2_15_x86_64", "py35-none-manylinux_2_14_x86_64", "py35-none-manylinux_2_13_x86_64", "py35-none-manylinux_2_12_x86_64", "py35-none-manylinux2010_x86_64", "py35-none-manylinux_2_11_x86_64", "py35-none-manylinux_2_10_x86_64", "py35-none-manylinux_2_9_x86_64", "py35-none-manylinux_2_8_x86_64", "py35-none-manylinux_2_7_x86_64", "py35-none-manylinux_2_6_x86_64", "py35-none-manylinux_2_5_x86_64", "py35-none-manylinux1_x86_64", "py35-none-linux_x86_64", "py34-none-manylinux_2_31_x86_64", "py34-none-manylinux_2_30_x86_64", "py34-none-manylinux_2_29_x86_64", "py34-none-manylinux_2_28_x86_64", "py34-none-manylinux_2_27_x86_64", "py34-none-manylinux_2_26_x86_64", "py34-none-manylinux_2_25_x86_64", "py34-none-manylinux_2_24_x86_64", "py34-none-manylinux_2_23_x86_64", "py34-none-manylinux_2_22_x86_64", "py34-none-manylinux_2_21_x86_64", "py34-none-manylinux_2_20_x86_64", "py34-none-manylinux_2_19_x86_64", "py34-none-manylinux_2_18_x86_64", "py34-none-manylinux_2_17_x86_64", "py34-none-manylinux2014_x86_64", "py34-none-manylinux_2_16_x86_64", "py34-none-manylinux_2_15_x86_64", "py34-none-manylinux_2_14_x86_64", "py34-none-manylinux_2_13_x86_64", "py34-none-manylinux_2_12_x86_64", "py34-none-manylinux2010_x86_64", "py34-none-manylinux_2_11_x86_64", "py34-none-manylinux_2_10_x86_64", "py34-none-manylinux_2_9_x86_64", "py34-none-manylinux_2_8_x86_64", "py34-none-manylinux_2_7_x86_64", "py34-none-manylinux_2_6_x86_64", "py34-none-manylinux_2_5_x86_64", "py34-none-manylinux1_x86_64", "py34-none-linux_x86_64", "py33-none-manylinux_2_31_x86_64", "py33-none-manylinux_2_30_x86_64", "py33-none-manylinux_2_29_x86_64", "py33-none-manylinux_2_28_x86_64", "py33-none-manylinux_2_27_x86_64", "py33-none-manylinux_2_26_x86_64", "py33-none-manylinux_2_25_x86_64", "py33-none-manylinux_2_24_x86_64", "py33-none-manylinux_2_23_x86_64", "py33-none-manylinux_2_22_x86_64", "py33-none-manylinux_2_21_x86_64", "py33-none-manylinux_2_20_x86_64", "py33-none-manylinux_2_19_x86_64", "py33-none-manylinux_2_18_x86_64", "py33-none-manylinux_2_17_x86_64", "py33-none-manylinux2014_x86_64", "py33-none-manylinux_2_16_x86_64", "py33-none-manylinux_2_15_x86_64", "py33-none-manylinux_2_14_x86_64", "py33-none-manylinux_2_13_x86_64", "py33-none-manylinux_2_12_x86_64", "py33-none-manylinux2010_x86_64", "py33-none-manylinux_2_11_x86_64", "py33-none-manylinux_2_10_x86_64", "py33-none-manylinux_2_9_x86_64", "py33-none-manylinux_2_8_x86_64", "py33-none-manylinux_2_7_x86_64", "py33-none-manylinux_2_6_x86_64", "py33-none-manylinux_2_5_x86_64", "py33-none-manylinux1_x86_64", "py33-none-linux_x86_64", "py32-none-manylinux_2_31_x86_64", "py32-none-manylinux_2_30_x86_64", "py32-none-manylinux_2_29_x86_64", "py32-none-manylinux_2_28_x86_64", "py32-none-manylinux_2_27_x86_64", "py32-none-manylinux_2_26_x86_64", "py32-none-manylinux_2_25_x86_64", "py32-none-manylinux_2_24_x86_64", "py32-none-manylinux_2_23_x86_64", "py32-none-manylinux_2_22_x86_64", "py32-none-manylinux_2_21_x86_64", "py32-none-manylinux_2_20_x86_64", "py32-none-manylinux_2_19_x86_64", "py32-none-manylinux_2_18_x86_64", "py32-none-manylinux_2_17_x86_64", "py32-none-manylinux2014_x86_64", "py32-none-manylinux_2_16_x86_64", "py32-none-manylinux_2_15_x86_64", "py32-none-manylinux_2_14_x86_64", "py32-none-manylinux_2_13_x86_64", "py32-none-manylinux_2_12_x86_64", "py32-none-manylinux2010_x86_64", "py32-none-manylinux_2_11_x86_64", "py32-none-manylinux_2_10_x86_64", "py32-none-manylinux_2_9_x86_64", "py32-none-manylinux_2_8_x86_64", "py32-none-manylinux_2_7_x86_64", "py32-none-manylinux_2_6_x86_64", "py32-none-manylinux_2_5_x86_64", "py32-none-manylinux1_x86_64", "py32-none-linux_x86_64", "py31-none-manylinux_2_31_x86_64", "py31-none-manylinux_2_30_x86_64", "py31-none-manylinux_2_29_x86_64", "py31-none-manylinux_2_28_x86_64", "py31-none-manylinux_2_27_x86_64", "py31-none-manylinux_2_26_x86_64", "py31-none-manylinux_2_25_x86_64", "py31-none-manylinux_2_24_x86_64", "py31-none-manylinux_2_23_x86_64", "py31-none-manylinux_2_22_x86_64", "py31-none-manylinux_2_21_x86_64", "py31-none-manylinux_2_20_x86_64", "py31-none-manylinux_2_19_x86_64", "py31-none-manylinux_2_18_x86_64", "py31-none-manylinux_2_17_x86_64", "py31-none-manylinux2014_x86_64", "py31-none-manylinux_2_16_x86_64", "py31-none-manylinux_2_15_x86_64", "py31-none-manylinux_2_14_x86_64", "py31-none-manylinux_2_13_x86_64", "py31-none-manylinux_2_12_x86_64", "py31-none-manylinux2010_x86_64", "py31-none-manylinux_2_11_x86_64", "py31-none-manylinux_2_10_x86_64", "py31-none-manylinux_2_9_x86_64", "py31-none-manylinux_2_8_x86_64", "py31-none-manylinux_2_7_x86_64", "py31-none-manylinux_2_6_x86_64", "py31-none-manylinux_2_5_x86_64", "py31-none-manylinux1_x86_64", "py31-none-linux_x86_64", "py30-none-manylinux_2_31_x86_64", "py30-none-manylinux_2_30_x86_64", "py30-none-manylinux_2_29_x86_64", "py30-none-manylinux_2_28_x86_64", "py30-none-manylinux_2_27_x86_64", "py30-none-manylinux_2_26_x86_64", "py30-none-manylinux_2_25_x86_64", "py30-none-manylinux_2_24_x86_64", "py30-none-manylinux_2_23_x86_64", "py30-none-manylinux_2_22_x86_64", "py30-none-manylinux_2_21_x86_64", "py30-none-manylinux_2_20_x86_64", "py30-none-manylinux_2_19_x86_64", "py30-none-manylinux_2_18_x86_64", "py30-none-manylinux_2_17_x86_64", "py30-none-manylinux2014_x86_64", "py30-none-manylinux_2_16_x86_64", "py30-none-manylinux_2_15_x86_64", "py30-none-manylinux_2_14_x86_64", "py30-none-manylinux_2_13_x86_64", "py30-none-manylinux_2_12_x86_64", "py30-none-manylinux2010_x86_64", "py30-none-manylinux_2_11_x86_64", "py30-none-manylinux_2_10_x86_64", "py30-none-manylinux_2_9_x86_64", "py30-none-manylinux_2_8_x86_64", "py30-none-manylinux_2_7_x86_64", "py30-none-manylinux_2_6_x86_64", "py30-none-manylinux_2_5_x86_64", "py30-none-manylinux1_x86_64", "py30-none-linux_x86_64", "py39-none-any", "py3-none-any", "py38-none-any", "py37-none-any", "py36-none-any", "py35-none-any", "py34-none-any", "py33-none-any", "py32-none-any", "py31-none-any", "py30-none-any"], "marker_environment": {"implementation_name": "cpython", "implementation_version": "3.9.15", "os_name": "posix", "platform_machine": "x86_64", "platform_python_implementation": "CPython", "platform_release": "5.15.0-1022-azure", "platform_system": "Linux", "platform_version": "#27~20.04.1-Ubuntu SMP Mon Oct 17 02:03:50 UTC 2022", "python_full_version": "3.9.15", "python_version": "3.9", "sys_platform": "linux"}}
@huonw huonw added the bug label Nov 22, 2022
@jsirois
Copy link
Contributor

jsirois commented Nov 22, 2022

The underlying issue is tracked here: pex-tool/pex#1899

@huonw
Copy link
Contributor Author

huonw commented Nov 22, 2022

Ah, thanks 👍

@huonw
Copy link
Contributor Author

huonw commented Nov 22, 2022

Is there a work-around? And/or is it worth allowing pants' python_awslambda to not pass --resolve-local-platforms similar to how pex_binary can customise it?

@jsirois
Copy link
Contributor

jsirois commented Nov 22, 2022

There is no workaround besides the obvious build on a compatible image. The path forward is definitely to just fix this in Pex.

jsirois pushed a commit to pex-tool/pex that referenced this issue Nov 25, 2022
…1991)

This makes --resolve-local-platforms work better with
--complete-platforms: if there's an external complete platform specified
for a platform that matches a local interpreter, the local interpreter's
complete platform is checked against that external complete platform. If
the local interpreter supports any additional tags, the local
interpreter is not used.

If the local interpreter/environment is newer (supports more tags), the
old behaviour would risk including wheels that aren't compatible with
the external complete platform. That is, execution will fail, see
pantsbuild/pants#17621 for an example.

Fixes #1899
@jsirois
Copy link
Contributor

jsirois commented Nov 25, 2022

I've assigned this to @huonw since he actually did all the work.

@jsirois
Copy link
Contributor

jsirois commented Nov 25, 2022

@huonw this is now fixed with your change released in Pex 2.1.116. You can activate this fix with:

[pex-cli]
version = "v2.1.116"
known_versions = [
  "v2.1.116|macos_arm64|3158c6ab70272f836daade412974e791a069af2eb1d43aee9c10cfdf63154385|4068322",
  "v2.1.116|macos_x86_64|3158c6ab70272f836daade412974e791a069af2eb1d43aee9c10cfdf63154385|4068322",
  "v2.1.116|linux_x86_64|3158c6ab70272f836daade412974e791a069af2eb1d43aee9c10cfdf63154385|4068322",
  "v2.1.116|linux_arm64|3158c6ab70272f836daade412974e791a069af2eb1d43aee9c10cfdf63154385|4068322"
]

Otherwise this will roll out with 2.16.x as things stand.

jsirois added a commit to jsirois/pants that referenced this issue Nov 25, 2022
jsirois added a commit that referenced this issue Nov 26, 2022
This upgrade brings in both a `--venv` `sys.path` fix and a fix relevant
to awslambda and GCF amongst other fixes.

The relevant changelogs are:
+ https://github.com/pantsbuild/pex/releases/tag/v2.1.114
+ https://github.com/pantsbuild/pex/releases/tag/v2.1.115
+ https://github.com/pantsbuild/pex/releases/tag/v2.1.116

Fixes #17621
Fixes #17531
Fixes #17372
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants