Repository navigation
feat(build): pass python-uv build properties to Lambda Builders - #9439
Merged
Merged
Conversation
🧪 Hands-on test: No problems observed in 6 scenariosCommit Scenarios
Runner's notes in full
🤖 Automated hands-on test — not a review approval · model claude-opus-5.5 · Kiro kiro-cli 2.33.1 · build History (2)
|
licjun
previously approved these changes
Nov 17, 2026
Map Metadata.BuildProperties UvGroups, UvExtras, UvAllExtras and UvPrune to the python_uv workflow options uv_groups, uv_extras, uv_all_extras and uv_prune. Fail the build when these keys are set on a resource that is not built with BuildMethod: python-uv, instead of ignoring them.
_build_layer called _get_build_options without a dependency manager, so a BuildMethod: python-uv layer with Uv* BuildProperties hit the 'only apply with python-uv' check. Pass the dependency manager for uv layers only; other layers keep None so their options are unchanged.
bnusunny
force-pushed
the
feat/python-uv-build-properties
branch
from
November 17, 2026 19:56
be4e054 to
24446d5
Compare
licjun
approved these changes
Nov 17, 2026
vicheey
approved these changes
Nov 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue(s) does this change fix?
None. Follow-up to the
python-uvbuild method.Why is this change necessary?
aws-lambda-builders #966 adds build options to the python_uv workflow: dependency groups, extras, and pruning packages the Lambda runtime already ships (such as
boto3). SAM CLI needs a way to pass them from the template.How does it address the issue?
For a function built with
BuildMethod: python-uv, theseMetadata.BuildPropertieskeys are passed to Lambda Builders:UvGroupsuv_groupsUvExtrasuv_extrasUvAllExtrasuv_all_extrasUvPruneuv_pruneThey are merged with the existing python options (
ParentPackageMode). Values are passed through as-is; Lambda Builders checks their types and fails with a clear message.They work on functions and on layers with
BuildMethod: python-uv. If any of these keys is set on a resource that is not built withpython-uv(pip, other runtimes, other layers), the build fails and names the resource and keys, instead of ignoring them.sam build --cachedalready rebuilds when these change, because function metadata is part of the build definition.Needs aws-lambda-builders 1.70.0 (aws-lambda-builders #966), which
developnow pins (#9442).Tested end to end with Lambda Builders installed from the #966 branch: the example above ran
uv export ... --group extra --prune boto3, and the artifact hadsixandidnabut noboto3/botocore.What side effects does this change have?
Templates that already set a
Uv*BuildProperty on a non-python-uvresource now fail to build. These keys had no effect before.Mandatory Checklist
PRs will only be reviewed after checklist is complete
make prpassesmake update-reproducible-reqsif dependencies were changedBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.