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

Set default value for HOSTNAME for python3-http templates #27

Merged
merged 1 commit into from
Mar 30, 2020

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 mehdi.yedes@gmail.com

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

Signed-off-by: Mehdi Yedes <mehdi.yedes@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.

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.

None yet

2 participants