-
Notifications
You must be signed in to change notification settings - Fork 1.2k
fix: use resource type instead of resource id for deciding zip method #4485
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
| @patch("samcli.lib.package.utils.zip_and_upload") | ||
| def test_upload_local_artifacts_local_folder_lambda_resources(self, zip_and_upload_mock): | ||
| for resource_id in LAMBDA_LOCAL_RESOURCES: | ||
| for resource_type in LAMBDA_LOCAL_RESOURCES: |
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.
Looks like this was full-filling test before then.. Thanks for the fix!
| read_until_string( | ||
| self.watch_process, | ||
| "\x1b[32mFinished syncing Function Layer Reference Sync HelloWorldFunction.\x1b[0m\n", | ||
| "\x1b[32mFinished syncing Layer HelloWorldFunction", |
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.
Let's change this to function instead of layer, and update L136 to be the same
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.
Sorry nevermind this is actually supposed to be layer, but I'm raising a CR to update the validation on L136 to be the same as this one
Which issue(s) does this change fix?
N/A
Why is this change necessary?
With this PR #4462, we've changed some permissions of the files in ZIP package if the file is used for serverless function resources. But that is checking if logical id of the resource is type.
How does it address the issue?
With this change, we are checking the resource type instead of resource logical id.
What side effects does this change have?
N/A
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.