feat: support for synchronous custom step handling#2408
feat: support for synchronous custom step handling#2408WilliamBergamin merged 22 commits intomainfrom
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2408 +/- ##
=======================================
Coverage ? 93.35%
=======================================
Files ? 37
Lines ? 7575
Branches ? 664
=======================================
Hits ? 7072
Misses ? 498
Partials ? 5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
I think I will break this up into 2 separate PRs, one to refactor and add more unit tests the other to introduce the auto acknowledge toggle |
|
Please review and merge #2424 first 🙇 🙏 |
zimeg
left a comment
There was a problem hiding this comment.
@WilliamBergamin LGTM! 👾 ✨
I had some trouble with outputs of the included example but found the example matching slack-samples/bolt-python-custom-step-template to work as expected!
A few comments ask quick questions about implementation, some on testing, and others around documentation. The testing changes might be nice to include in this PR, but I understand if larger efforts on documentation are better for a follow up 🫡
Huge GG on the lift to set this PR up for a quick review as well 🚢 💨
Co-authored-by: Eden Zimbelman <[email protected]>
Summary
This PR changes the way
function_executedevents handle auto acknowledgement. These changes lift the auto ack logic into a middleware that is then registered to thefunctionlistener.The
functionlistener exposes anautoAcknowledgeflag, when enabled (default) the auto ack middleware is added, when disabled the auto ack middleware is not added. This allows thefunctionlistener to support dynamic options use cases, functions used as dynamic inputs mustcompleteorfailbefore acknowledging the request (this provides a crisp user experience).Example
Manual tests
These changes were manually tested against
Testing
npm install&npm packnpm install path/to/the/bolt-js/slack-bolt-4*.tgzto install the built package in a project with a custom step like bolt-js-custom-step-template{ autoAcknowledge: false }ackinput parameter in your handlerawait ack();for this specfic handlerRequirements (place an
xin each[ ])