-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
feat: Resolve symlinks at root level and mount to container #5870
Merged
lucashuy
merged 15 commits into
aws:feat/build-in-source
from
lucashuy:build_in_source_docker_mounts
Sep 19, 2023
Merged
feat: Resolve symlinks at root level and mount to container #5870
lucashuy
merged 15 commits into
aws:feat/build-in-source
from
lucashuy:build_in_source_docker_mounts
Sep 19, 2023
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
github-actions
bot
added
area/local/start-api
sam local start-api command
area/local/invoke
sam local invoke command
area/local/start-invoke
pr/internal
labels
Aug 30, 2023
mildaniel
reviewed
Sep 1, 2023
@@ -0,0 +1 @@ | |||
cats |
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.
I prefer dogs 🐶
…o build_in_source_docker_mounts
…o build_in_source_docker_mounts
mildaniel
approved these changes
Sep 14, 2023
mndeveci
approved these changes
Sep 14, 2023
Comment on lines
+256
to
+259
additional_volumes[host_resolved_path] = { | ||
"bind": container_full_path, | ||
"mode": mount_mode, | ||
} |
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.
As we discussed offline, we need to check with security about this part before releasing it.
github-merge-queue bot
pushed a commit
that referenced
this pull request
Dec 5, 2023
* feat: Added event tracking for feature (#5872) * Added event tracking for feature * Correctly pass event value and fix typing * feat: Resolve symlinks at root level and mount to container (#5870) * Resolve symlinks at root level and mount to container * Continue early instead of nesting in if statement * make format * Added integration test * make format * Use node project to test local deps and building in source * Removed old test data * Update test class name to reference testing symlinks * Use correct skip decorator from unittest * Changed mount mode to read only * Removed the removed mount parameter in tests * Remove kwarg in method call * feat: Build in source click option (#5951) * Added skeleton for build in source click option * Fix tests and renamed option * Added description and updated click option to include build * Disable build tests again until esbuild resolution fix * Revert template change * Make hook name option mutually exclusive with build in source * Fix integration test message assert * chore(tests): Enable build in souce build command tests (#6099) * chore(tests): Node build in source test (#6132) * Added nodejs tests * make format * Enable retries * Run build test inside of a scratch directory * make format * Updated Makefile test to properly use scratch directory and moved source copy to setup * Changed copytree call to in house version * Removed redundant parent method calling * make format * chore: Bump Nodejs version in AppVeyor job configuration (#6210) * Bump npm version to 10.2.3 for linux testing * Upgrade node to 18.18.2 * chore(tests): Build in source sync temp folder (#6166) * Enable and use new test data folder paths * Added nodejs tests * feat: Resolve root level symlinked folders in Layers (#6236) * Resolve Layer symlinks before mounting container * Use .get instead of if else * Added integration tests * Unprivate static method and make format * Create paths using pathlib * Remove debug flag * Revert "Resolve Layer symlinks before mounting container" This reverts commit e557067. * Resolve links when creating tarfile for Docker build call * make format * Removed debug line * Updated arugment with optional typing * feat: Add additional default excludes and exclude option for sync (#6299) * Add additional default excludes and exclude option * Updated test and option definition * Updated option and added tests * Update resource match to consider nested stacks * Handle parameters saved in samconfig * fix: Fix sync tests not cleaning up correctly and Linux watch behaviour (#6372) * Use develop version of Lambda Builders * Run nodejs local dep command in scratch directory and clean up aws-sam folder * Exclude the folder of the modified file from trigger sync flows on Linux * Revert "Use develop version of Lambda Builders" This reverts commit fde143e. * Add test validing ignoring Linux modified folder events * Fix test
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area/local/invoke
sam local invoke command
area/local/start-api
sam local start-api command
area/local/start-invoke
pr/internal
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.
Why is this change necessary?
Previously, any symlinked top level files in the source code folder for Lambda functions were not being mounted/linked correctly when running in a container.
How does it address the issue?
Goes through the top level files and directories and resolves the symlinks if there are any. Then we mount the resolved files/directories to that location in the container.
What side effects does this change have?
None.
Mandatory Checklist
PRs will only be reviewed after checklist is complete
make pr
passesmake update-reproducible-reqs
if dependencies were changedBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.