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.
(after adding a rule to build before tests).
Global build takes about 2s to build all binaries, and it saves
about 4s in one run of mysqlctl.py, so it's gonna be good!
Currently, the worker tests are hanging from time to time.
Travis kills these tests automatically after 10 minutes (of not
receiving any output). We can be more aggressive about it and kill them
ourselves after 5 minutes.
1. move common dependencies into parent pom.
2. upgrade com.google.guava to 18.0.
3. rename java build target to java_client_test.
4. fix makefile so java client test will run tests from each sub package.