https://pantsbuild.org/ logo
#general
Title
# general
c

clever-crayon-70731

10/25/2022, 4:50 PM
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

fast-nail-55400

10/25/2022, 4:53 PM
what happens if you run
./package package
with
--no-local-cache
?
e

enough-analyst-54434

10/25/2022, 4:53 PM
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

clever-crayon-70731

10/25/2022, 4:54 PM
Yes, I read most of the thread (109 replies, puh!)
e

enough-analyst-54434

10/25/2022, 4:54 PM
@clever-crayon-70731 are you willing to tackle https://github.com/pantsbuild/pex/issues/1899?
c

clever-crayon-70731

10/25/2022, 5:02 PM
@fast-nail-55400 still the same result, checksums identical
e

enough-analyst-54434

10/25/2022, 5:06 PM
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

clever-crayon-70731

10/25/2022, 5:07 PM
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

enough-analyst-54434

10/25/2022, 5:15 PM
Correct.
If you can't do that then you need the Pex fix.
c

clever-crayon-70731

10/25/2022, 8:24 PM
I'm surprised not more people are facing this issue.
e

enough-analyst-54434

10/25/2022, 8:43 PM
There certainly could be a bystander affect going on.
c

clever-crayon-70731

10/25/2022, 9:57 PM
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