Bug: PythonUvBuilder does not target Lambda manylinux compatibility
Maintainer thường phản hồi trong vòng 6 ngày
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 70/100
Hướng nghiên cứu
Start by reading the PythonUvBuilder and UvRunner code that constructs the uv pip install platform target; the issue identifies the python_uv workflow and gives a local wheel reproduction. Check how Python runtime version and architecture map to Lambda's AL2 and AL2023 glibc compatibility, then run the reproduction for both architectures and runtime groups. Done means the Python 3.12+ case selects manylinux_2_34, the Python 3.8–3.11 case targets AL2 compatibility, and the incompatible wheel is rejected.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Description
PythonUvBuilder passes x86_64-unknown-linux-gnu or aarch64-unknown-linux-gnu to uv pip install for every Python runtime. These generic targets do not encode Lambda's runtime-specific manylinux compatibility.
On Windows with uv 0.11.26, I reproduced both:
python3.11: given wheels taggedmanylinux_2_17andmanylinux_2_28, the builder selects the latter. Lambda's AL2 runtime has glibc 2.26, so a wheel requiring 2.28 is incompatible.python3.12: given wheels taggedmanylinux_2_34andmanylinux_2_35, the builder fails to find a compatible wheel, even though Lambda's AL2023 runtime supports glibc 2.34. Usingx86_64-manylinux_2_34selects the correct wheel.
The same results reproduce for arm64. The fixtures below test wheel selection using valid wheel metadata; they do not require compiling or loading a native extension.
Steps to reproduce
Run with aws-lambda-builders 1.68.0 and uv installed. This example exercises the Python 3.12 failure using local wheels only:
import os
from pathlib import Path
from tempfile import TemporaryDirectory
from zipfile import ZipFile
from aws_lambda_builders.workflows.python_uv.packager import UvRunner
with TemporaryDirectory() as directory:
root = Path(directory)
wheels = root / "wheels"
wheels.mkdir()
for minor in (34, 35):
tag = f"py3-none-manylinux_2_{minor}_x86_64"
with ZipFile(wheels / f"platform_demo-1.0.0-{tag}.whl", "w") as wheel:
wheel.writestr("platform_demo.py", f"GLIBC_MINOR = {minor}\n")
wheel.writestr("platform_demo-1.0.0.dist-info/METADATA",
"Metadata-Version: 2.1\nName: platform-demo\nVersion: 1.0.0\n")
wheel.writestr("platform_demo-1.0.0.dist-info/WHEEL",
f"Wheel-Version: 1.0\nRoot-Is-Purelib: false\nTag: {tag}\n")
wheel.writestr("platform_demo-1.0.0.dist-info/RECORD", "")
manifest = root / "requirements.txt"
manifest.write_text("platform-demo==1.0.0\n", encoding="utf-8")
os.environ.update(UV_NO_INDEX="1", UV_OFFLINE="1", UV_FIND_LINKS=wheels.as_uri())
UvRunner().install_requirements(
str(manifest), str(root / "artifacts"),
python_version="3.12", platform="linux", architecture="x86_64",
)
Observed result
UvInstallationError: ... platform-demo==1.0.0 has no wheels with a matching platform tag (e.g., manylinux_2_28_x86_64)
Expected result
Select the glibc 2.34 wheel for Python 3.12+, reject the 2.35 wheel, and use AL2-compatible targeting for Python 3.8-3.11. The selection should follow the Lambda runtime and architecture rather than generic GNU/Linux defaults.
AWS documents the glibc 2.26 / 2.34 runtime boundary. UV supports explicit manylinux targets.
Environment and related work
- Windows, Python 3.13.3, uv 0.11.26
- aws-lambda-builders 1.68.0, upstream commit
e3e14536501e38b0d6d8db582ddec6d0e0bd6f8a - Reproduced through
LambdaBuilder.build()for both architectures and both experimental-flag settings. - #700, #752, and #762 concern
python_pip; this report concerns the separatepython_uvcommand construction. I checked the open/closed issue and PR history for an existing UV fix.
- Ngôn ngữ chính
- Python
- Star
- 381
- Fork
- 161
- Merge trung bình
- 5 ngày 14 giờ
- Pull request đã merge (30 ngày)
- 3
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của aws/aws-lambda-builders
-
Bug: PythonUvBuilder resolves local requirements from the caller directoryCó thể đã có người làm @vinsymoyya đã nhận 2 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
aws/aws-lambda-builders#952 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 6 ngày
-
python_uv: `UvConfig.compile_bytecode` is never passed to uv, so the option has no effectCó thể đã có người làm @xujiantop-crypto đã nhận 52 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
aws/aws-lambda-builders#925 · 1 reaction ·
Maintainer thường phản hồi trong vòng 6 ngày
-
Bytecode compiled during build is always discarded at runtime: SAM packaging writes 1980 timestamps, so timestamp-based .pyc never validateCó thể đã có người làm @xujiantop-crypto đã nhận 52 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 64/100
aws/aws-lambda-builders#924 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 6 ngày
-
Bug: PythonUvBuilder fails to build app with dependencies on editable installs in the workspaceCó thể đã có người làm @noritada đã nhận 121 ngày trước. Đang mởstage/needs-triage
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 25/100
aws/aws-lambda-builders#892 ·
Maintainer thường phản hồi trong vòng 6 ngày
-
Feature request: Add native uv support and configurationCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởstage/needs-triage type/feature
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 38/100
aws/aws-lambda-builders#839 · 3 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 6 ngày
Tất cả issue của aws/aws-lambda-builders
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
aws-samples/sample-per-model-bedrock#795 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Pretalx reports older version to be the latest release than what is actually installed and availableĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
micropython/micropython#19906 ·
Maintainer thường phản hồi trong vòng 1 ngày