It has not been working for a while and I was not able to fix it.
Additionally, it recently started to flake e.g. we saw this error:
> Bad response status from coveralls: 422 - {"message":"Couldn't find a
repository matching this job.","error":true}
https://travis-ci.org/youtube/vitess/jobs/206464990
Let's remove it and replace it with something else at a later point.
Export VT_GO_PARALLEL from the Makefile to subprocesses. Fixes the problem that the variable was not used for 'make unit_test_race'.
VT_GO_PARALLEL is used to explicitly set the degree of concurrent packages tested in Travis. We do this because a value of 4 is faster than the default of 2 (for the two available CPUs).
Starting with Go 1.7 the output of the generated protobuf files will differ because Go 1.7 has changes to the compression library.
While most of the main developers will be on Go 1.7, external contributors might still be on a lower version.
If they run 'make build', the generated protobuf Go code will get generated with different content and this will confuse them.
To avoid this, let's switch back to generate the protobufs explicitly via 'make proto'.
The change achieves the following:
1. Adds generation of Go and Python protobuf files during build by adding
dependency of 'build' rule on 'proto' rule. This will avoid surprises of
'make build' giving error when proto file is changed.
2. Modifies the generation of protobuf files to be more in line of how Makefiles
should be written. This has an additional benefit that protobuf files won't
be regenerated if proto files did not change.
3. Modifies the generation rules to work both locally on a workstation and
inside the docker image. Docker image doesn't have /vt/dist/grpc installed,
so the existing rule didn't work.
Note that as a result of this a new directory go/vt/.proto.tmp will exist after
building. I believe that should be fine and won't interfere with anything.
Since building of docker_lite* targets doesn't make sense without building
docker_base* targets, then it would be benficial to simplify the process by
adding the dependencies of docker_lite* on docker_base* and trigger the build
by a single make command.
Documentation is adjusted accordingly. Plus I added clarification of where MySQL
flavor should be present in different commands. And added note that bootstrap
image should be re-pulled each time before an attempt to build docker_lite,
because old bootstrap image can lead to build failures with the latest vitess
sources.
This optimization would not pick up version changes (e.g. when we
upgrade the vendor'd "github.com/golang/protobuf/protoc-gen-go" repo
copy by running bootstrap.sh) and unnecessarily introduce confusion.
Without the optimization, "make proto" won't be slowed down noticeable
when the plugin was already installed.
Note that I have to copy the code from the vendor/ directory to $GOPATH because "govendor" currently has no command like "restore" which "godep" did have.
Add `--docker` flag to run preview/publish without needing to set up
Ruby or Jekyll:
``` sh
vitess$ ./preview-site.sh --docker
vitess$ ./publish-site.sh --docker
```
Before this, the command always succeeded, even if races were found.
I'm grepping over the output of go test -race to check if there is race because there is no other way to distinguish between a found race and a flaky test.
The Makefile previously listed tests explicitly for groups like
site_test and worker_test. These lists got out of date when tests were
removed from test/config.json, and the make rules broke. Now the groups
are defined in config.json itself, so there is one place to update
everything.
I can't get signals to work on the child processes launched by bash,
even if I use a helper script that explicitly signals its children.
That meant that test timeouts didn't actually terminate the test in
non-Docker mode.
We were only using bash to split the command line into args anyway.
Instead, let's just have the config give us the args pre-split.
Sending signals without bash in the way seems to work better.