-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
s3 zip includes files that should be matched by the exclude
setting
#1083
Comments
So it looks like the correct way to exclude a directory is just to give its name without any glob character, as in |
The glob syntax does nothing for me either, and the docs mention exclude uses regex patterns (not glob), but I couldn't get that to work as expected. Using the plain directory names worked though. |
Reopening, seems like this is a documentation bug? |
@Miserlou I guess it depends on what is intended. The texts says regex, the example shows globs, and the code does it's own thing. (personally I'd say globs would be ideal). |
Same issue here |
* Support Newest Manylinux Version for dependencies Zappa was hard coded to only allow Manylinux 1, 2010, and 2014. Manylinux 2_24 is getting more traction, so dependencies are becoming incompatible with Zappa over time. More information on new Manylinux versions can be found here - https://github.com/pypa/manylinux An important example is Cryptography, where version 3.4.7 is the last one to support old-format linux wheels. https://pypi.org/project/cryptography/3.4.7/#files vs newest: https://pypi.org/project/cryptography/#files Tested on my env to make sure that manylinux 2_24 wheels would work without issue in Lambda * Update core.py Co-authored-by: hellno <[email protected]>
Context
I am attempting to deploy a Flask app as an AWS Lambda + API Gateway but pretty am consistently seeing way too many files I don't want in the zip produced by the
package
command. The specific files I want to include are all those found in the.tox
directory of my git repo.My working directory has a file named
zappa_settings.json
with the following contents:I happen to be using ZappaCLI programmatically for some pytest fixtures I am working on, but the problem is also reproducible when running
zappa package pytest
I chose to use
.tox/*
because that is how I see it done in zappa itself with.git/*
:https://github.com/Miserlou/Zappa/blob/master/zappa/core.py#L174
And I can confirm that
.git/*
does the trick since I don't see any paths in the resulting archive starting with.git/
Expected Behavior
I shouldn't see any paths starting with
.tox/
in the archive that zappa produces.Actual Behavior
I see a metric shit ton of paths starting with
.tox/
in the archive that zappa produces.Possible Fix
For my specific use case it will probably make sense to add
.tox/*
tozappa.core.ZIP_EXCLUDES
.Steps to Reproduce
.tox/*
to theexclude
list in your zappa settingszappa package <envname>
Your Environment
o.43.2
Debian 9
andPython 3.6.2
pip freeze
:zappa_settings.py
:The text was updated successfully, but these errors were encountered: