hashicorp / faas-nomad

OpenFaaS plugin for Nomad
https://www.openfaas.com
MIT License
254 stars 46 forks source link

Support of-watchdog http mode (status code) #67

Closed acornies closed 5 years ago

acornies commented 5 years ago

What are the steps to reproduce this issue?

  1. Build and or deploy a function that uses of-watchdog in the image (tested with powershell-http)
  2. Invoke a function that expects a response code other than 200
  3. Check the gateway response code

What happens?

faas-nomad returns the default http response writer status code (200) instead of honoring the function status code itself.

What were you expecting to happen?

faas-nomad returns status code of upstream function

Any logs, error output, etc?

curl -i -XPOST -d 'this is a curl test' -H 'Custom-Header_Andrew: cat' http://192.168.50.2:8080/function/powershell-example
HTTP/1.1 200 OK
Content-Length: 75
Content-Type: text/plain; charset=utf-8
Date: Mon, 07 Jan 2019 17:47:35 GMT
Server: Microsoft-NetCore/2.0
X-Call-Id: 11ddf5d5-5bfe-4f59-83d3-2cfa289d28d3
X-Duration-Seconds: 0.004418
X-Start-Time: 1546883255454259180

Hello! Your input was: this is a curl test with alternate http status201int

Any other comments?

Adding this for tracking. Will open a PR for it shortly.

What versions of software are you using?

Operating System: Ubuntu 16.04 x64

OpenFaaS Version: 0.9.11

Nomad Version: 0.8.6

nicholasjackson commented 5 years ago

Hey @acornies sorry for the delay, just merged all of your PRs and built a new image v0.3.6

Kind regards,

Nic