aws / aws/aws-elastic-beanstalk-cli
Deploys are not compressed when .ebignore is present.
- Dominant language
- Python
- Stars
- 181
- Forks
- 88
- PR merge metrics
- No merged PRs in 30d
Description
### Description
When using `eb deploy` with a `.ebignore` file present, the application version uploaded to S3 is not compressed. Without a `.ebignore` file, `git archive` (which *does* compress the archive) is used instead of the zipfile operations in `ebcli/core/fileoperations.py`.
### Steps to reproduce
Create a `.ebignore` file within an application and run `eb deploy`.
### Observed result
Files added to Application Version ZIP created are not compressed. You can see the files added are uncompressed (`b-`) by running `zipinfo` on the Application Version uploaded to S3:

### Expected result
Files added should be compressed like when without a `.ebignore` file. In my own application this resulted in a 174MB version (without compression), compared to 71MB (with compression).
I'm not enough of a Python developer to say for sure, but it looks like when the zipfile is initialised it specifies ZIP_DEFLATED correctly but does not appear to specify a compression level?
### Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
1. OS: MacOS 11.6
2. EBCLI version: 3.20
Contributor guide
Research direction
Start in ebcli/core/fileoperations.py and trace the eb deploy path used when .ebignore is present, comparing it with the git archive path used without .ebignore. Reproduce with a .ebignore file, inspect the uploaded archive with zipinfo, and consider the issue done when its files are compressed like the no-.ebignore deployment.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, python
- Domain
- cli, cloud
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100