-
Notifications
You must be signed in to change notification settings - Fork 77
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
.ebignore includes symlinked files in ignored directories #69
Comments
@tomchkk thanks for reporting this issue. We will look into it and post any updates here. |
Any progress on this? This error exists since years. |
I've looked into the code and noticed that here the symlinks are written into the zip without checking if they are in the .ebignore file. |
I've opened a PR with the fix for that. |
I second merging the PR. I haven't reviewed the PR, but this bug makes me want to self-host my stuff somewhere far away from AWS. |
Any updates on this issue? Without this fix, Elastic Beanstalk app.zip can end with a bunch of symlinks that point to undefined locations. For example, I can have this error on startup:
Because 'collections' is a symlink to a folder that do not exist in AL2. All workarounds I am studying are quite painful… so it would be great to fix it. |
Yeah, really annoying that this is still not fixed. Look at my PR (which is more a workaround instead of a fix). You could also delete the symlinks before uploading to AWS and recreate them after the deployment. |
Yeah, I looked, thanks @vince1995 . Though it does not work really well in my case, since I have a great number of symlinks. What I ended doing is just deleting the slice of code that 'zips' symlinks. |
For anyone facing this issue, I created a branch that does NOT zip symlinks (even when they aren't ignored). It is a fork from the version 3.20.3. If you have awsebcli in your requirements file, you can download de patched version directly from git:
Hope this helps! |
Yes, that's something I thought of as well, but I wanted to create a solution that could be merged into the master branch because some developers may explicitly want the symlinks in the zip bundle. |
Fixed bug where a folder mentioned in .ebignore file was being included in the final code.zip on running eb deploy. This was due to the presence of a symlink within that folder.
I have fixed the symlink issue. The symlinks are being treated like just another file/directory. |
Symlinks are still being included, even if an explicit path to the problematic symlink is added to .ebignore. Could this issue be re-opened? |
I will confirm if the symlinks are still being included in zip. Will re-open this issue if it still exists. |
Same case here and still have the problem. Having a sub-module Git that is linked with Composer (as a You included a 'vendor' folder in your source bundle Unziping the source zip in Windows doesn't do anything with that symlink, so no [...]
inflating: [...]
inflating: [...]
finishing deferred symbolic links:
vendor/allsoftware/allsoftware-symfony-bundle -> ../../lib/allsoftware-symfony-bundle/ |
Any update ? |
Working on a fix. |
Hi All, Fix has been pushed to master. Pease pull the latest code to test. Broken/dangling symlinks are ignored. Folders with symlinks added are ignored entirely if added to .ebignore. |
Hi All, New version for EBCLI has been released. Please update the ebcli version by referring docs. |
It seems like it wasn't fixed yet.
Error when running
version is latest:
The culprit:
|
any updates on this ? |
I just add to ignore those links to my .gitignore file: Just add this line fixed it: |
I'm working with EB CLI 3.20.10 and this is still an issue. My virtual environment folder (virt/) is included in the .ebignore, but the broken symlink virt/lib64 keeps being included with Another observation: Our fix:
|
Description
Having specified
.ebignore
to ignore a whole directory, if that directory contains a symlink, that symlink is not ignored and included in the source bundle that eb cli creates.Steps to reproduce
With an eb application and environment set up - where the project contains a directory called
ignore
and, within that, one standard directorydir
and one symlinked directorysymlink
; and the project's.ebignore
file contains an entry to ignore that whole directory from the created artifact - runeb deploy env-name
..ebignore
file:Observed result
The artifact created and uploaded to S3 will contain symlinked directory
ignore/symlink
, but notignore/dir
.Structure of example project
eb-bug
:Actual (partial) output from
eb deploy env-name --debug
shows no entry at all for./bin/ignore/symlink
:Expected result
The artifact created and uploaded to S3 should not contain directory
ignore
.Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
The text was updated successfully, but these errors were encountered: