aws-elastic-beanstalk-cli icon indicating copy to clipboard operation
aws-elastic-beanstalk-cli copied to clipboard

Deploys are not compressed when .ebignore is present.

Open jwpage opened this issue 3 years ago • 0 comments

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:

Screen Shot 2021-12-05 at 5 22 32 pm

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

jwpage avatar Dec 06 '21 00:12 jwpage