Skip to content

Conversation

@mehyedes
Copy link
Contributor

The HOSTNAME environment variable is not available in faasd, which makes any function using the python3-http template fail with the following error with a KeyError exception.

Setting a default value should fix this issue

Signed-off-by: Mehdi Yedes [email protected]

This will avoid raising KeyError exceptions when trying to fetch the
value of the HOSTNAME env variable on faasd.

Signed-off-by: Mehdi Yedes <[email protected]>
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.

LGTM

@alexellis alexellis merged commit e2e2e9e into openfaas:master Mar 30, 2020
@alexellis
Copy link
Member

Thank you @mehyedes

Just to note for anyone who lands here, this issue was seen with faasd and when running the template directly on MacOS outside of a container where HOSTNAME wasn't available as an env-var.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants