zappa / Zappa

Serverless Python
https://zappa.ws/zappa
MIT License
3.25k stars 363 forks source link

[Migrated] Update with slim_handler and -z doesn't update code #779

Closed jneves closed 5 months ago

jneves commented 3 years ago

Originally from: https://github.com/Miserlou/Zappa/issues/1923 by dughibot

Context

We've been using zappa deploy our code. We're using the slim_handler setting because our code with all of its requirements is somewhat large. We've been having issues getting a certain library (xmlsec) to load properly. In order to get around this issue, we started running zappa package, updating the zip file to include the required dependencies for the xmlsec library, then running zappa update. However, we've found that this won't update our application code. When running zappa update -z myapp_handler.zip, we find that the tar file with our application code is not uploaded to s3, which means we have to upload it as a separate step in the deploy process.

Expected Behavior

zappa update should upload new application code to s3 for the handler to pull in.

Actual Behavior

zappa update just uploads the new handler zip, and not the application code archive

Possible Fix

It might be that it's ambiguous as to what the package that zappa update should upload since zappa package creates both a zip and a tar file when slim_handler is set to true, in which case, maybe there should be an option for zappa update that allows us to specify the archive file

Steps to Reproduce

With slim_handler set to true in zappa_settings.json:

  1. run zappa deploy dev
  2. run zappa package -o myapp_handler.zip dev
  3. run zappa update dev -z myapp_handler.zip
  4. Check the s3 bucket contained the application archive file for myapp and observe that the timestamp will match the zappa deploy, not the zappa update.

Your Environment

github-actions[bot] commented 5 months ago

Hi there! Unfortunately, this Issue has not seen any activity for at least 90 days. If the Issue is still relevant to the latest version of Zappa, please comment within the next 10 days if you wish to keep it open. Otherwise, it will be automatically closed.

github-actions[bot] commented 5 months ago

Hi there! Unfortunately, this Issue was automatically closed as it had not seen any activity in at least 100 days. If the Issue is still relevant to the latest version of Zappa, please open a new Issue.