-
-
Notifications
You must be signed in to change notification settings - Fork 644
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
Support complete_platforms for python_awslambda
.
#14532
Merged
jsirois
merged 1 commit into
pantsbuild:main
from
jsirois:complete_platforms/lambdas/AWS
Feb 18, 2022
Merged
Support complete_platforms for python_awslambda
.
#14532
jsirois
merged 1 commit into
pantsbuild:main
from
jsirois:complete_platforms/lambdas/AWS
Feb 18, 2022
Conversation
This file contains 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
Instead of (or in addition to) specifying a `runtime` for a `python_awslambda`, you can now specify `complete_platforms`. This allows creating a lambdex when an abbreviated platform string does not provide enough information to evaluate environment markers during the requirement resolution phase of building the lambdex. # Rust tests and lints will be skipped. Delete if not intended. [ci skip-rust] # Building wheels and fs_util will be skipped. Delete if not intended. [ci skip-build-wheels]
benjyw
approved these changes
Feb 18, 2022
jsirois
added a commit
to jsirois/pants
that referenced
this pull request
Feb 18, 2022
Instead of (or in addition to) specifying a `runtime` for a `python_awslambda`, you can now specify `complete_platforms`. This allows creating a lambdex when an abbreviated platform string does not provide enough information to evaluate environment markers during the requirement resolution phase of building the lambdex. (cherry picked from commit b46a02f) # Rust tests and lints will be skipped. Delete if not intended. [ci skip-rust] # Building wheels and fs_util will be skipped. Delete if not intended. [ci skip-build-wheels]
jsirois
added a commit
that referenced
this pull request
Feb 18, 2022
…da`. (Cherry-picks of #14532 & #14469) (#14533) There are two cherry-picks. The goal is #14532 and #14469 comes along to make that a clean pick. 1.) #14532: --- Instead of (or in addition to) specifying a `runtime` for a `python_awslambda`, you can now specify `complete_platforms`. This allows creating a lambdex when an abbreviated platform string does not provide enough information to evaluate environment markers during the requirement resolution phase of building the lambdex. (cherry picked from commit b46a02f) 2.) #14469 --- PR #13894 added `include_requirements:bool` flag to exclude third-party deps from `pex_binary` artifacts. I have a similar need for `python_awslambda` builds, which already is using the `pex_binary` Request rule. This PR adds a `include_requirements` field to `python_awslambda` (default=True, not changing current behavior) and passes that to `PexFromTargetsRequest`. Some alternatives to this feature suggested in slack [full thread here](https://pantsbuild.slack.com/archives/C01CQHVDMMW/p1644844772442459): 1. transitive excludes with `!!`: https://www.pantsbuild.org/docs/targets#dependencies-field on specific dependencies 2. reusing the same lambdex zip and alter the `LAMBDEX_ENTRY_POINT` on the functions themselves: https://github.com/pantsbuild/lambdex#controlling-runtime-execution Alternative 1 requires adding a new exclusion every time a new third-party dep is added to any of your in-repo dependencies, meaning extra work & extra config. Alternative 2 does not allow the use of [Lambda Layers](https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html) to upload expensive/large/slow-changing deps once, and redeploy only your first-party changes. (cherry picked from commit 82d4270)
alonsodomin
pushed a commit
to alonsodomin/pants
that referenced
this pull request
Feb 25, 2022
Instead of (or in addition to) specifying a `runtime` for a `python_awslambda`, you can now specify `complete_platforms`. This allows creating a lambdex when an abbreviated platform string does not provide enough information to evaluate environment markers during the requirement resolution phase of building the lambdex.
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.
Instead of (or in addition to) specifying a
runtime
for apython_awslambda
, you can now specifycomplete_platforms
. Thisallows creating a lambdex when an abbreviated platform string does not
provide enough information to evaluate environment markers during the
requirement resolution phase of building the lambdex.
[ci skip-rust]
[ci skip-build-wheels]