question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Better supports for Events API on FaaS

See original GitHub issue

Description

Related to #361, I would like to introduce a new option to AppOptions in the next minor version or Bolt 2.

I would love to get you all’s suggestions for better naming but it is a flag to turn on/off the automatic Events API request acknowledgment. It allows developers to customize the behavior here: https://github.com/slackapi/bolt/blob/%40slack/bolt%401.5.0/src/App.ts#L474-L475

If we go with a name like autoEventAck, the default value is supposed to be true. If a developer set it as false, the app.event listener has ack function and it’s expected to call it for sure.

This is necessary to run Bolt apps safely on FaaS (Function-as-a-Service). Without this, Events API handlers may unexpectedly be terminated even while they’re still running.

What type of issue is this? (place an x in one of the [ ])

  • bug
  • enhancement (feature request)
  • question
  • documentation related
  • testing related
  • discussion

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

  • I’ve read and understood the Contributing guidelines and have done my best effort to follow them.
  • I’ve read and agree to the Code of Conduct.
  • I’ve searched for any related issues and avoided creating a duplicate issue.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:4
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
aoberoicommented, Feb 5, 2020

My biggest concern is introducing an option for this behavior makes sample code, middleware, and documentation less portable. If some apps have the option set to the opposite of the default, they have to be very careful to comb through all their code to modify .event() listenerse (and middleware which operate on events) to do the right thing. In documentation, we’ll have to add caveats about this in many places.

I think the optionality will fragment our audience and increase our effort. Is that worth it?

Why can’t the FaaS implementation send responses after the event is fully processed (which it can in v2)? Even the .action() listeners who call ack() shouldn’t actually send the response until the event is fully processed. This alternate behavior can be full encapsulated in a Receiver implementation.

0reactions
seratchcommented, Apr 4, 2020

Agreed. The issue for the bug is #462 (for reference)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Better supports for Events API on FaaS · Issue #395 - GitHub
My biggest concern is introducing an option for this behavior makes sample code, middleware, and documentation less portable.
Read more >
Event-Driven Architecture: FaaS, Streams and Serverless
When item events are sent to the system, they are received via a FaaS function. This function will validate, enrich and either reject...
Read more >
Triggers - OpenFaaS
The OpenFaaS event-pattern allows you to create a broker or separate microservice which maps functions to topics and invokes functions via the OpenFaaS...
Read more >
What is FaaS (Function-as-a-Service)? - IBM
FaaS, or Function-as-a-Service, is a cloud-computing service that allows customers to execute code in response to events, without managing the complex ...
Read more >
What is FaaS? Function as a Service explained | DigitalOcean
Function as a Service, or FaaS, is a subset of serverless computing that's focused on event-driven triggers. Learn the benefits of FaaS and ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found