microservices-demo / user

The users microservice.
http://microservices-demo.github.io/
Apache License 2.0
91 stars 617 forks source link

updated .travis.yml to specify go 1.7.5 #47

Closed rberlind closed 7 years ago

rberlind commented 7 years ago

I edited .travis.yml to specify go 1.7.5 since I think this might be needed to actually use Go 1.7.5 in the user app on the Docker images despite https://github.com/microservices-demo/user/blob/master/Dockerfile being built from golang:1.7-alpine which currently already uses Go 1.7.5. This is in connection with https://github.com/microservices-demo/user/issues/46.

Thanks.

rberlind commented 7 years ago

Well, the test failed, but maybe because I ran against my own fork? Note that the Travis build log does show go 1.7.5 being used which is good. Also, I see: Successfully built 74426bc79434 (line 8328) The command "make test" exited with 0 (line 8404) The command "make coverprofile" exited with 0. (line 8494) Successfully built 7f4a0f31a5a0 (line 8652) Successfully built e1feec6148ba (line 8845)

The problem seems to be with the dockertest command:

scripts/testcontainer.sh Error: bad response code from user service 000 make: *** [dockertest] Error 1 The command "make dockertest" exited with 2. Done. Your build exited with 1.

rberlind commented 7 years ago

I think the testcontainer.sh failed because the sleep was not long enough. On my laptop, when I ran the test it also failed, but I noticed the containers were still running. So, I tried running the testcontainer.sh script and it was successful. So, I increased the sleep in that file from 2 to 10 seconds and will close and re-open this pull request so that the test is run again.

rberlind commented 7 years ago

Re-opening to see if sleep of 10 seconds helps.

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 23.252% when pulling 2e7573177cbd0372dc6c17aef8d76530b8071fe2 on rberlind:master into 1714eca3ba643b9e2b9cd6c7e5a384bf89a20d8b on microservices-demo:master.

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 23.252% when pulling 2e7573177cbd0372dc6c17aef8d76530b8071fe2 on rberlind:master into 1714eca3ba643b9e2b9cd6c7e5a384bf89a20d8b on microservices-demo:master.

rberlind commented 7 years ago

The build seem to have stalled out eventually, but note that setting the sleep to 10 seconds in testcontainer.sh DID allow that script to succeed.

After that, I saw: The command "make dockertest" exited with 0. (line 8910)

and eventually:

No output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself.

I will re-open and force another build.

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 23.252% when pulling 2e7573177cbd0372dc6c17aef8d76530b8071fe2 on rberlind:master into 1714eca3ba643b9e2b9cd6c7e5a384bf89a20d8b on microservices-demo:master.

rberlind commented 7 years ago

Note that the last thing before the message about waiting 10 minutes is:

docker login -u -p Password:

I think the build failure is probably ok and merely reflects that I don't have the DOCKER_PASS variable set. I presume if you guys run it, you will have that set and the test will complete successfully.

jasonrichardsmith commented 7 years ago

Why is the sleep moved to 10? @rberlind

rberlind commented 7 years ago

Hi Richard, See my comments above about the sleep. With the original value of 2 seconds, I think there was not enough time for the containers to be ready for the testcontainer.sh script to succeed. At least not on the day I was running the tests. Changing to 10 allowed the test to succeed. I don't particularly care about the value since it won't affect the runtime aspects of the docker image or app. Thanks Roger

rberlind commented 7 years ago

Setting go version in travis file did the trick. Thanks.