Skip to content

Conversation

alexellis
Copy link
Member

Description

Fixes issue found in #73 via @bmcstdio

How Has This Been Tested?

  • Set an invalid value for faas_gateway_address such as gateway.openfaas.svc.cluster.local:9090 - at runtime :8080 will be appended and this will now fail to post but not cause a panic
  • Set an invalid value for faas_gateway_port and the code will panic on start-up and log out the error

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.

@alexellis
Copy link
Member Author

Feel free to test out openfaas/queue-worker:0.8.4-rc9-amd64

@alexellis
Copy link
Member Author

cc @acornies @jonatasbaldin please take a look at the changes mostly from @bmcstdio with some additional missing error handling (which may be historical).

I'm curious why we didn't run into this earlier, perhaps the image wasn't updated since we accepted the changes?

main.go Outdated

natsQueue := NATSQueue{
clusterID: config.NatsClusterName,
clusterID: "faas-cluster",
Copy link
Contributor

Choose a reason for hiding this comment

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

Regression?

@alexellis alexellis changed the title Fix for queue-worker Fix for issue #73 Nov 25, 2019
Due to an issue described in #73 by @bmcstdio the error handling
has been improved to prevent nil pointer dereference errors in
several scenarios.

Improves error messages for queue-worker output.

Tested with and without gateway_invoke by changing the gateway
port to an invalid one and the gateway address to an invalid one.

Closes: #73

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
@alexellis alexellis force-pushed the openfaasltd/fix-gateway-invoke branch from becc587 to 9470845 Compare November 25, 2019 21:04
@alexellis
Copy link
Member Author

Squashed / rebased. Latest image is: openfaas/queue-worker:0.8.4-rc9-amd64

Anyone affected by this can revert to an earlier version of the queue-worker. Before #67 was merged or try the pre-release image from above.

@bmcustodio
Copy link
Contributor

@alexellis openfaas/queue-worker:0.8.4-rc9-amd64 seems to be working fine regarding this issue.

@alexellis alexellis merged commit f67fee0 into master Nov 26, 2019
@alexellis alexellis deleted the openfaasltd/fix-gateway-invoke branch November 26, 2019 09:52
@alexellis
Copy link
Member Author

Thanks Bruno. I'll kick off a release, can you update helm please?

@alexellis
Copy link
Member Author

@bmcustodio
Copy link
Contributor

openfaas/faas-netes#556

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.

2 participants