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

X-Duration-Seconds header is not set on function timeout #77

Closed
ewilde opened this issue Dec 9, 2019 · 1 comment · Fixed by #78
Closed

X-Duration-Seconds header is not set on function timeout #77

ewilde opened this issue Dec 9, 2019 · 1 comment · Fixed by #78

Comments

@ewilde
Copy link
Contributor

ewilde commented Dec 9, 2019

If the original function invocation takes longer than than the functions combined read_timeout and write_timeout the X-Duration-Seconds header is not set on the callback function

Expected Behaviour

X-Duration-Seconds should be set on the callback function

Steps to Reproduce (for bugs)

  1. Create a function a , make is sleep for 10 seconds
  2. Create a callback function b that prints the X-Duration-Seconds header
  3. invoke function a i.e. curl http://127.0.0.1:8080/async-function/a -d 'hello' -H 'X-Callback-Url: http://gateway:8080/function/b'
@ewilde ewilde changed the title X-Duration-Seconds not set on function timeout X-Duration-Seconds header is not set on function timeout Dec 9, 2019
@ewilde
Copy link
Contributor Author

ewilde commented Dec 9, 2019

This may be expected behaviour, if it's not I guess the following high level fix:

Either

  • If X-Duration-Seconds is missing from original function call response, use time measured by queue worker

Or

  • Fix why header is not being set by watchdog (harder)

ewilde added a commit to ewilde/nats-queue-worker that referenced this issue Dec 9, 2019
Set X-Duration-Seconds header when original function call exceeds
timeout.

Fixes openfaas#77

Signed-off-by: Edward Wilde <ewilde@gmail.com>
ewilde added a commit to ewilde/nats-queue-worker that referenced this issue Dec 9, 2019
Set X-Duration-Seconds header when original function call exceeds
timeout.

Fixes openfaas#77

Signed-off-by: Edward Wilde <ewilde@gmail.com>
alexellis pushed a commit that referenced this issue Dec 10, 2019
Set X-Duration-Seconds header when original function call exceeds
timeout.

Fixes #77

Signed-off-by: Edward Wilde <ewilde@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant