aws / aws-elastic-beanstalk-cli

The EB CLI is a command line interface for Elastic Beanstalk that provides interactive commands that simplify creating, updating and monitoring environments from a local repository.
Apache License 2.0
161 stars 77 forks source link

eb deploy doesn't zip symlinks-to-directories #511

Open khaidirsh opened 7 months ago

khaidirsh commented 7 months ago

Description

Symlink to directory not found in zipped application.

Seems commit 790cde6b7b08d0d69ce44064cdf395f1cc5e5817 produces this issue, because as Python documentation about os.walk:

... dirnames is a list of the names of the subdirectories in dirpath (including symlinks to directories, and excluding '.' and '..').

Thus, the mentioned commit has removed the process of including symlinks-to-directories into the zip.

Steps to reproduce

  1. Create directory as such:

    folder_a/
    ├─ folder_b/
    │  ├─ file_b
    file_a
    symlink_to_folder_b
  2. Run eb deploy

Observed result

symlink_to_folder_b fully skipped (not found in debug log)

...
2024-02-13 22:46:20,065 (INFO) eb :  +adding: ./folder_a/
2024-02-13 22:46:20,066 (INFO) eb :   +adding: ./folder_a/file_a
2024-02-13 22:46:20,068 (INFO) eb :  +adding: ./folder_a/folder_b/
2024-02-13 22:46:20,068 (INFO) eb :   +adding: ./folder_a/folder_b/file_b
...

Expected result

Symlink to directory added to application zip.

Additional environment details (Ex: Windows, Mac, Amazon Linux etc)

  1. OS: macOS 13.6.4
  2. EBCLI version: 3.20.10