Skip to content
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

Add adapter for Zappa (flask) or example #628

Closed
1 of 4 tasks
rezen opened this issue Mar 29, 2022 · 3 comments
Closed
1 of 4 tasks

Add adapter for Zappa (flask) or example #628

rezen opened this issue Mar 29, 2022 · 3 comments
Labels

Comments

@rezen
Copy link

rezen commented Mar 29, 2022

Zappa is a commonly used lambda framework that smushes your Flask app into a lambda. It also provisions and sets up related AWS resources for running the app which is super helpful. I tried leveraging the Flask example and deploying with Zappa, but it didn't work, which isn't surprising since "under the hood" it's actually a lambda invoking the Flask routes. I tried tweaking the flask example with this bit below, but it wasn't quite right. It seemed like events were not being properly processed, I'm not sure.

app = App(
    process_before_response=True,
# ...

https://github.com/zappa/Zappa

Category (place an x in each of the [ ])

  • slack_bolt.App and/or its core components
  • slack_bolt.async_app.AsyncApp and/or its core components
  • Adapters in slack_bolt.adapter
  • Others

Requirements

Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.

@seratch seratch added question Further information is requested area:adapter need info labels Mar 30, 2022
@seratch
Copy link
Member

seratch commented Mar 30, 2022

Hi @rezen, thanks for writing in!

Zappa looks so cool! If I understand correctly, Zappa runs Flask, Django, and so on as-is on FaaS. As long as your Flask app works along with Zappa on FaaS, your bolt-python app should not need any adapter on the bolt-python side.

process_before_response=True

Yes, this option must be enabled for FaaS use case.

Can you share a bit more details such as your current source code, the errors that you are facing with us? In the same reason with #619 (comment) for Quart framework, supporting Zappa is not our high priority. We are happy to help you out as much as possible but we don't have the bandwidth to create a new example in the short term.

Also, I know that you are planning to use Zappa for your app management but in general, we highly recommend our simple aws-lambda adapter. With the adapter, you can more easily take advantage of built-in features such as lazy listeners: https://slack.dev/bolt-python/concepts#lazy-listeners For FaaS use cases, lazy listeners are so powerful. Implementing the same on your own would require more efforts and research.

I hope this was helpful to you!

@github-actions
Copy link

github-actions bot commented May 2, 2022

👋 It looks like this issue has been open for 30 days with no activity. We'll mark this as stale for now, and wait 10 days for an update or for further comment before closing this issue out. If you think this issue needs to be prioritized, please comment to get the thread going again! Maintainers also review issues marked as stale on a regular basis and comment or adjust status if the issue needs to be reprioritized.

@github-actions
Copy link

As this issue has been inactive for more than one month, we will be closing it. Thank you to all the participants! If you would like to raise a related issue, please create a new issue which includes your specific details and references this issue number.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants