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

Question about async invocations #1298

Closed
3 tasks done
lihaiswu opened this issue Aug 29, 2019 · 5 comments
Closed
3 tasks done

Question about async invocations #1298

lihaiswu opened this issue Aug 29, 2019 · 5 comments

Comments

@lihaiswu
Copy link

lihaiswu commented Aug 29, 2019

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)

  1. Send post request to https://openfaas/async-function/any-name
  2. User will receive 202 accept. But no way to check the status.

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.

@alexellis
Copy link
Member

/set title: Question about async invocations

@derek derek bot changed the title Nonexistent async function always return 202 Accepted Question about async invocations Aug 29, 2019
@alexellis
Copy link
Member

Hi @lihaiswu

Please can you explain how this affects your use-case?

Alex

@lihaiswu
Copy link
Author

@alexellis it does not affect my usage. Just think the response is not expected. It should 404, instead of 202 for nonexisttent aync function.

@burtonr
Copy link
Contributor

burtonr commented Sep 2, 2019

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.

@embano1
Copy link

embano1 commented Dec 2, 2019

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.

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

No branches or pull requests

4 participants