After getting ABI incompatible wheels in my lambda...
# general
c
After getting ABI incompatible wheels in my lambda zips, I did the following: 1. Retrieve platform spec from AWS base image 2. Create a target for the platform spec JSON and reference it in
python_awslambda(..., complete_platforms=[":platform"])
However, running
pants package
does not produce a different lambda.zip (I compared checksums) What am I missing?
f
what happens if you run
./package package
with
--no-local-cache
?
e
That sounds like https://github.com/pantsbuild/pex/issues/1899 That was identified after a long battle a few weeks ago in Pants slack but no work has been done on it.
c
Yes, I read most of the thread (109 replies, puh!)
e
@clever-crayon-70731 are you willing to tackle https://github.com/pantsbuild/pex/issues/1899?
c
@fast-nail-55400 still the same result, checksums identical
e
The problem wont go away unless that Pex issue is fixed or else Pants grows an option to not pass
--resolve-local-platforms
when building lambdas. The former is the right fix.
c
I don't fully understand the problem yet.
If we were to run
pants package
etc. from within the AWS base image, we'd sidestep the problem, right?
e
Correct.
If you can't do that then you need the Pex fix.
c
I'm surprised not more people are facing this issue.
e
There certainly could be a bystander affect going on.
c
Is there perhaps a way somewhere to set the target platform to manylinux2014_x86_64? I don't see much in the docs atm.
Actually a bit more compact, it overrides any global setting for manylinux locally since it knows about AWS: https://github.com/pantsbuild/pants/blob/2aa289a22a46296bff43aa2cbb38bb125dc134c7/src/python/pants/backend/awslambda/python/rules.py#L96-L110