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

Update of-watchdog to 0.7.1 #29

Merged
merged 1 commit into from
Sep 20, 2019
Merged

Conversation

cconger
Copy link

@cconger cconger commented Aug 30, 2019

Description

Updates the version of of-watchdog to latest 0.7.1
Largely includes changes for logging both from the watchdog itself and how logging is captured from the wrapped go process.

More detail about changes can be seen at the releases of of-watchdog

How Has This Been Tested?

I manually copied these templates into a new directory and generated and deployed two new functions on a Docker for Mac managed Kubernetes cluster.

golang-http

faas-cli new --lang golang-http test-golang-http
# update the image name in the generated .yml file to `cconger/`
faas-cli up test-golang-http
faas-cli invoke test-golang-http
# Verify the proper input echoing behavior
faas-cli logs test-golang-http
# Verify the output of expected logs

test-golang-http invocation

Reading from STDIN - hit (Control + D) to stop.
test
Hello world, input was: test

test-golang-http logs

WARNING! Communication is not secure, please consider using HTTPS. Letsencrypt.org offers free SSL/TLS certificates.
2019-08-30T00:44:30Z Forking - ./handler []
2019-08-30T00:44:30Z 2019/08/30 00:44:30 Started logging stderr from function.
2019-08-30T00:44:30Z 2019/08/30 00:44:30 Started logging stdout from function.
2019-08-30T00:44:30Z 2019/08/30 00:44:30 OperationalMode: http
2019-08-30T00:44:30Z 2019/08/30 00:44:30 Timeouts: read: 10s, write: 10s hard: 10s.
2019-08-30T00:44:30Z 2019/08/30 00:44:30 Listening on port: 8080
2019-08-30T00:44:30Z 2019/08/30 00:44:30 Writing lock-file to: /tmp/.lock
2019-08-30T00:44:30Z 2019/08/30 00:44:30 Metrics listening on port: 8081
2019-08-30T00:45:01Z 2019/08/30 00:45:01 POST / - 200 OK - ContentLength: 29

golang-middleware

faas-cli new --lang golang-middleware test-golang-middleware
# update the image name in the generated .yml file to `cconger/test-golang-middleware:latest`
faas-cli up test-golang-middleware
faas-cli invoke test-golang-middleware
# Verify the proper input echoing behavior
faas-cli logs test-golang-middleware --name=false --instance=false
# Verify the output of expected logs

test-golang-middleware invocation

Reading from STDIN - hit (Control + D) to stop.
test
Hello world, input was: test

test-golang-middlware logs

WARNING! Communication is not secure, please consider using HTTPS. Letsencrypt.org offers free SSL/TLS certificates.
2019-08-30T00:41:07Z Forking - ./handler []
2019-08-30T00:41:07Z 2019/08/30 00:41:07 Started logging stderr from function.
2019-08-30T00:41:07Z 2019/08/30 00:41:07 Started logging stdout from function.
2019-08-30T00:41:07Z 2019/08/30 00:41:07 OperationalMode: http
2019-08-30T00:41:07Z 2019/08/30 00:41:07 Timeouts: read: 10s, write: 10s hard: 10s.
2019-08-30T00:41:07Z 2019/08/30 00:41:07 Listening on port: 8080
2019-08-30T00:41:07Z 2019/08/30 00:41:07 Writing lock-file to: /tmp/.lock
2019-08-30T00:41:07Z 2019/08/30 00:41:07 Metrics listening on port: 8081
2019-08-30T00:41:18Z 2019/08/30 00:41:18 POST / - 200 OK - ContentLength: 29

How are existing users impacted? What migration steps/scripts do we need?

Logging will be slightly different for new applications. Log lines can now exceed 256 bytes when sent from the wrapped function process. No mitigation steps seem likely.

Checklist:

I have:

  • updated the documentation and/or roadmap (if required)
  • read the CONTRIBUTION guide
  • signed-off my commits with git commit -s
  • added unit tests

You can see the changes of the releases since 0.5.3 at https://github.com/openfaas-incubator/of-watchdog/releases

Signed-off-by: Channing Conger <[email protected]>
@cconger
Copy link
Author

cconger commented Aug 30, 2019

I do not have an ARM based deployment to test so I did not modify those templates, but if you'd like them in lock step happy to include.

@bmcustodio
Copy link
Contributor

Thank you for this @cconger, as well as for your work on https://github.com/openfaas-incubator/of-watchdog regarding logging. 0.7.2 has been released now, any chance we could...

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
Copy link
Member

I'm going to merge this but if we have a newer version could one of you please send an additional patch in?

@alexellis alexellis merged commit 0b0b655 into openfaas:master Sep 20, 2019
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.

3 participants