-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Question about async invocations #1298
Comments
/set title: Question about async invocations |
Hi @lihaiswu Please can you explain how this affects your use-case? Alex |
@alexellis it does not affect my usage. Just think the response is not expected. It should 404, instead of 202 for nonexisttent aync function. |
This is the way that async functions are intended to operate, and explained in the docs along with options for getting values back and checking the status. Think of it as sending a letter in the post. You put the letter in the box, and the carrier accepts it. If the address does not exist, you would not know about it immediately. That is what an async function call is. The async handler accepts the request, hence the 202 response. I'm going to close this issue for now, but feel free to continue to comment. |
I do agree with the author and raised this concern in openfaas-incubator/vcenter-connector#31. Let's see what @alexellis responds. Happy to contribute a patch here. |
My actions before raising this issue
For unexistent function, the async invocation should response 404 not found. Instead of 202 accepted.
Expected Behaviour
For unexistent async function invocation, it should response 404
Current Behaviour
Nonexistent async function always return 202 Accepted
Possible Solution
Gateway should check if the function exist and return error as needed
Steps to Reproduce (for bugs)
Context
There's no way to track the async function status except for the function start handling the request and send result via callback.
Your Environment
FaaS-CLI version ( Full output from:
faas-cli version
):Docker version
docker version
(e.g. Docker 17.0.05 ):Version: 19.03.1
API version: 1.40
Go version: go1.12.5
Git commit: 74b1e89
Built: Thu Jul 25 21:18:17 2019
OS/Arch: darwin/amd64
Experimental: false
Server: Docker Engine - Community
Engine:
Version: 19.03.1
API version: 1.40 (minimum version 1.12)
Go version: go1.12.5
Git commit: 74b1e89
Built: Thu Jul 25 21:17:52 2019
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: v1.2.6
GitCommit: 894b81a4b802e4eb2a91d1ce216b8817763c29fb
runc:
Version: 1.0.0-rc8
GitCommit: 425e105d5a03fabd737a126ad93d62a9eeede87f
docker-init:
Version: 0.18.0
GitCommit: fec3683
Are you using Docker Swarm or Kubernetes (FaaS-netes)?
Kubernetes
Operating System and version (e.g. Linux, Windows, MacOS):
MacOS
Code example or link to GitHub repo or gist to reproduce problem:
Other diagnostic information / logs from troubleshooting guide
Next steps
You may join Slack for community support.
The text was updated successfully, but these errors were encountered: