-
Notifications
You must be signed in to change notification settings - Fork 25
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
Strange Function Success / Failure Behavior #284
Comments
@anthonygualandri -Hm, so that |
Thanks @srajiang. That functions.completeSuccess call is not being explicitly made by me in the code but by having the .env file flagged with SLACK_DEBUG=true. Just wanted to make sure that part was clear in case it has something to do with the implementation of that flag. |
I am also see the I really think it has to do with the restriction that your function has to complete in 3 seconds, because that's what Slack has decided is the limit for local apps (vs deployed apps, which have a 15-second limit). |
Thanks for the context @anthonygualandri - so it's just a log, and you're not explicitly trying to complete the function. This does sound like the timeout issue @mcsescott refers to. |
Alright, there's some ongoing internal discussion about the 3s vs. 15s timeouts, I don't have anything new to share on that front and so my best guess is that at the moment, this local vs. deployed app timeout distinction is sticking around. @anthonygualandri are you able to to confirm whether you see this error in your deployed app? (Writing this, I know this is a little strange, given that you should be able to test under the same conditions you're deploying in 😞 ). But, if you ARE in a position to confirm that it doesn't happen in the deploy scenario, then that's informative. |
@mcsescott could you share the code and configuration of the "hello world" app, I don't seem to be able to reproduce this with the hello world sample project My steps:
|
There is no logging for the app that can give you the token revoked message, but it appears I am getting hit by the 3-second limit that Slack has imposed on locally developed apps, which is a continual problem for development. 👎 |
Yess the 3-second limit has been a limiting feature for others as well, the simplest work around for this is to use some sort of message broker like amazon mq to offload long running processes to workers, allowing the request to be response within the timeout limit |
The
deno-slack
versionsDeno runtime version
OS info
Steps to reproduce
Getting kind of strange function behavior. When I run a function that calls an external api from inside of it, if the number of records returned by the call is somewhat large then the slack debug function output looks like this:
functions.completeSuccess request payload: { "outputs": {}, "function_execution_id": "Fx06LTHRJH9N" } functions.completeSuccess response payload: { ok: false, error: "token_revoked" }
But when I reduce the size of the payload returned it outputs this:
functions.completeSuccess request payload: { "outputs": {}, "function_execution_id": "Fx06L1U0AV9T" } functions.completeSuccess response payload: { ok: true }
Any idea what’s going on? What does the size of the payload have to do with whether or not slack accepts the slack token being used in the function call? Is there a timeout on functions that I’m not aware of? If so then payload response is not all that clear in order to understand what’s going on. Thanks for any light you can shed on this.
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.
The text was updated successfully, but these errors were encountered: