.ebignore includes symlinked files in ignored directories
See original GitHub issueDescription
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 directory dir
and one symlinked directory symlink
; and the project’s .ebignore
file contains an entry to ignore that whole directory from the created artifact - run eb deploy env-name
.
.ebignore
file:
/bin/ignore/
Observed result
The artifact created and uploaded to S3 will contain symlinked directory ignore/symlink
, but not ignore/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
:
...
2021-03-21 08:28:27,522 (INFO) eb : Found .ebignore, using system zip.
2021-03-21 08:28:27,522 (DEBUG) ebcli.core.fileoperations : Project root found at: /path/2/eb-bug
2021-03-21 08:28:27,522 (INFO) eb : Zipping up folder at location: /path/2/eb-bug
2021-03-21 08:28:27,523 (INFO) eb : +adding: .//
2021-03-21 08:28:27,523 (INFO) eb : +adding: ./.envrc
2021-03-21 08:28:27,524 (INFO) eb : +adding: ./Issue.md
2021-03-21 08:28:27,524 (INFO) eb : +adding: ./.gitignore
2021-03-21 08:28:27,524 (INFO) eb : -skipping: ./.ebignore
2021-03-21 08:28:27,524 (INFO) eb : +adding: ./bin/
2021-03-21 08:28:27,525 (INFO) eb : +adding: ./bin/cli
2021-03-21 08:28:27,525 (INFO) eb : -skipping: ./bin/ignore/dir/file
2021-03-21 08:28:27,525 (INFO) eb : -skipping: ./.elasticbeanstalk
2021-03-21 08:28:27,525 (INFO) eb : -skipping: ./.elasticbeanstalk/app_versions
2021-03-21 08:28:27,525 (INFO) eb : +adding: ./.git/
...
Expected result
The artifact created and uploaded to S3 should not contain directory ignore
.
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
- OS: macos 11.2.3
- EBCLI version: EB CLI 3.19.3 (Python 3.9.2)
Issue Analytics
- State:
- Created 3 years ago
- Reactions:6
- Comments:14
Top GitHub Comments
@tomchkk thanks for reporting this issue. We will look into it and post any updates here.
I’ve opened a PR with the fix for that.