fix: replace symlinks with dirs for Finch container mount compatibility - #6
Merged
Conversation
…8647) Docker's images.list(name='samcli/lambda') does exact repository matching and won't match repositories like 'samcli/lambda-python'. This caused stale images to persist across parameterized test classes, leading to flaky test_download_two_layers failures where Layer2 should overwrite Layer1 but the image was never rebuilt. Fix by: 1. Adding _cleanup_samcli_images() that lists all images and filters by 'samcli/lambda-' tag prefix 2. Using this method in both tearDown and tearDownClass 3. Fixing the same pattern in TestLayerVersionThatDoNotCreateCache
* fix: isolate PyInstaller library paths for subprocess calls When SAM CLI runs from the native installer (PyInstaller-based), it sets LD_LIBRARY_PATH/DYLD_LIBRARY_PATH to include bundled libraries. This causes conflicts when spawning external processes like npm, node, or pip that need system libraries (e.g., OpenSSL version mismatch on Fedora 43). This change: - Detects PyInstaller bundle via sys._MEIPASS - Filters bundled library paths from environment variables early in CLI init - Ensures external processes use system libraries instead of bundled ones Fixes aws#8542 * fix: use more specific path filtering to avoid filtering legitimate system paths Addressed review feedback from @bnusunny: - Changed from '_internal not in p' to 'p.endswith(/_internal)' - This prevents accidentally filtering legitimate system paths that contain _internal in the middle - Added test to verify paths like /usr/lib/some_internal_lib are preserved --------- Co-authored-by: Harold Sun <sunhua@amazon.com>
Bumps [pycparser](https://github.com/eliben/pycparser) from 2.22 to 3.0. - [Release notes](https://github.com/eliben/pycparser/releases) - [Commits](eliben/pycparser@release_v2.22...release_v3.00) --- updated-dependencies: - dependency-name: pycparser dependency-version: '3.0' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…ws#8629) Bumps [aws-actions/configure-aws-credentials](https://github.com/aws-actions/configure-aws-credentials) from 5 to 6. - [Release notes](https://github.com/aws-actions/configure-aws-credentials/releases) - [Changelog](https://github.com/aws-actions/configure-aws-credentials/blob/main/CHANGELOG.md) - [Commits](aws-actions/configure-aws-credentials@v5...v6) --- updated-dependencies: - dependency-name: aws-actions/configure-aws-credentials dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
When build_in_source is used with Node.js, the build directory contains a node_modules symlink. During local invoke, SAM CLI resolves this symlink and creates an additional bind mount. Docker tolerates creating a mountpoint over a symlink, but Finch (containerd/runc) fails with 'not a directory'. This fix temporarily replaces symlinks with empty directories before container creation, then restores them afterward. This ensures: - Finch/runc gets a valid directory mountpoint - Docker continues to work as before - Repeated invocations work because symlinks are restored - Host filesystem is left unchanged even if container creation fails
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.
When build_in_source is used with Node.js, the build directory contains a node_modules symlink. During local invoke, Finch (containerd/runc) fails with 'not a directory' when creating a mountpoint over the symlink. This fix temporarily replaces symlinks with empty directories before container creation, then restores them afterward.