openfaas / nats-queue-worker

Queue-worker for OpenFaaS with NATS Streaming
https://docs.openfaas.com/reference/async/
MIT License
128 stars 59 forks source link

Remove invalid hostname characters from nats client id #45

Closed ewilde closed 5 years ago

ewilde commented 5 years ago

Todo

Similar to #24 running this docker image on an ecs instance. ECS hostname contains . which is not supported by nats as a value for the clientid.

Description

When running this docker image on Amazon ECS you get the following error:

stan: invalid clientID: only alphanumeric and-or_characters allowed.

This is because the ECS host name contains periods . i.e. ip-10-0-1-140.eu-west-1.compute.internal

How Has This Been Tested?

Test output:

Wait for 5m0s
Listening on [faas-request], clientID=[faas-worker-ip-10-0-4-89_eu-west-1_compute_internal], qgroup=[faas] durable=[]

Test output:

Loading basic authentication credentials
Wait for  5m0s
Listening on [faas-request], clientID=[faas-worker-2b97ea65f696], qgroup=[faas] durable=[]

Types of changes

Checklist:

alexellis commented 5 years ago

There's outstanding feedback, so we want to fix it before merging? @rgee0 @ewilde

LucasRoesler commented 5 years ago

@rgee0 and @alexellis is there anything else to do here?

ewilde commented 5 years ago

I just need to re-test since I addressed comments

alexellis commented 5 years ago

@ewilde please can you give an update?

I'm not sure if I can merge this since "todo" says "re-test" and the title says "WIP".

Alex

alexellis commented 5 years ago

Derek add label: blocked

ewilde commented 5 years ago

@alexellis PTAL, retested on swarm and fargate