-
Notifications
You must be signed in to change notification settings - Fork 1.2k
feat: add python option for creating parent packages during copy #8248
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
Conversation
|
Note: PR checks will fail until aws-lambda-builders releases 1.58.0 with aws/aws-lambda-builders#765, but everything works locally using pip editable mode and both repos. |
|
I noticed that aws-lambda-builders 1.58.0 was released so this is ready for PR workflows now. Thank you! |
|
Yes, we released your builders changes so we could take a look at this one. I will follow up soon. Thanks again for your contributions! |
|
I saw some integration tests failed and I have pushed a fix for that issue. I ran the integration tests locally with python 3.12 which is why I didn't see that issue. For the Update reproducible requirements failure, it looks like a permissions issue since my PR is from a fork. |
I rebased off the develop branch so my PR no longer includes changes to requirements/base.txt and therefore this workflow will not run again. |
reedham-aws
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code itself looks good to me, nice work @joeyhage!
I don't think there's a place in any of the documentation in this repo that could be updated with this change. Other BuildProperties are documented in official AWS documentation here, so that's something we'd have to take care of internally. I will discuss this internally with the team.
|
Thanks, @reedham-aws! I really appreciate your feedback and support with both PRs for this feature. |
|
Hi @joeyhage, |
reedham-aws
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After discussing, we will merge this and it will be officially released in the next version of SAM CLI. For the documentation, we will handle it, although it's not blocking for the actual release. Thank you again for your contributions @joeyhage!!
|
This feature is now documented in https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-using-build.html |
|
Thanks, @reedham-aws! I noticed a typo in the metadata example on that page. The example used snake case and the code is pascal case. Here's the Sam template used in the tests I wrote: https://github.com/aws/aws-sam-cli/blob/develop/tests/integration/testdata/buildcmd/template_with_metadata_python.yaml#L35 |
|
I have alerted this issue to the docs team and provided proper snippets with explanations. Thank you for your prompt response @joeyhage! |
I added documentation to aws-lambda-builders for its API. I was unable to find the existing BuildProperties documentation to update.
Which issue(s) does this change fix?
#6593
Why is this change necessary?
Python allows ambiguous relative imports so importing
uuidis usually from the standard library but could also be a fileuuid.pyadjacent to the handler module. PEP 8 advises absolute imports or explicit relative imports, and the Google Python Style Guide provides examples of the pitfalls.How does it address the issue?
This change integrates with a change that was merged in AWS Lambda Builders. It provides a mechanism for explicit package names and auto package names.
What side effects does this change have?
N/A, it is opt-in only.
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.