Skip to content

Conversation

ewilde
Copy link
Contributor

@ewilde ewilde commented Dec 9, 2019

Set X-Duration-Seconds header when original function call exceeds
timeout.

Fixes #77

Signed-off-by: Edward Wilde ewilde@gmail.com

Description

Motivation and Context

  • I have raised an issue to propose this change (required)

How Has This Been Tested?

Tested on Mac OS with docker swarm

  1. Created function a with that sleeps longer than timeout
  2. Created callback function that prints X-Duration-Seconds header

Before change

Logs from callback function

2019/12/09 02:56:41 stderr: 2019/12/09 02:56:41 Status:[502], time:[], body:

After change

Logs from callback function

2019/12/09 03:23:20 Status:[502], time:[10.024013], body:

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I've read the CONTRIBUTION guide
  • I have signed-off my commits with git commit -s
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Set X-Duration-Seconds header when original function call exceeds
timeout.

Fixes openfaas#77

Signed-off-by: Edward Wilde <ewilde@gmail.com>
Copy link
Member

@alexellis alexellis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved

@alexellis alexellis merged commit dea1c90 into openfaas:master Dec 10, 2019
@alexellis
Copy link
Member

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 this pull request may close these issues.

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

2 participants