This was a regression which was introduced by https://github.com/vitessio/vitess/pull/3722.
Before this fix, the "go" binary always failed to run with the following error:
> go: GOPATH entry is relative; must be absolute path: "".
> For more details see: 'go help gopath'
Signed-off-by: Michael Berlin <mberlin@google.com>
Add a test script that regenerates the contents of sql.go into a temp
file and then compares to the current contents in order to make sure
that the version checked in matches the output of the expected
toolchain.
This makes it easier to find out where a binary may come from.
Before:
$ vtworker --version
Version: 34c5b80b4 built on Wed Jun 14 22:38:45 PDT 2017 by mberlin@hostname using go1.8 linux/amd64
After:
$ vtworker --version
Version: 30d07ef9a (Git branch 'version_output_fixes') built on Wed Jun 14 22:44:13 PDT 2017 by mberlin@hostname using go1.8 linux/amd64
This will make the --version more readable.
before:
$ vtworker --version
Version: 512ba51169 built on Wed Jun 14 22:30:38 PDT 2017 by mberlin@hostname using go1.8 linux/amd64
after:
$ vtworker --version
Version: 34c5b80b4 built on Wed Jun 14 22:38:45 PDT 2017 by mberlin@hostname using go1.8 linux/amd64
Please refer to #2694 and #2670 for motivation and reasoning for
this change.
I've tried to follow best practice in inserting the copyright
headers. In other open source projects, not all files carry
the notice. For example documentation doesn't. I've followed
similar ground rules.
I did not change the php because there is a separate LICENSE
file there by Pixel Federation. We'll first need to notify
them our intent before changing anything there.
As for the presubmit check, it's going to be non-trivial
because of the number of exceptions, like file types,
directories and generated code. So, it will have to be
a separate project.
After node is freshly installed, it is not part of PATH. By sourcing
dev.env, we fix this.
I've also changed the file of the temporary, downloaded file to include ".tar".
The test requires many dependencies which prolong the current test duration by up to 10 minutes on Travis.
Once we figured out how to cache the dependencies both on Travis and our local machines, we can re-enable the test.
Instead of commenting the code for installing the dependencies, I've moved it to bootstrap_web.sh for now.
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).
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.
There is no proto3 compiler for PHP yet, but the wire format of proto3
is backward-compatible with proto2. To avoid maintaining two copies of
our proto files, we use a translator to make the simple syntax changes
necessary to work in PHP's proto2 compiler.
Service stubs are not generated, since I haven't plugged in gRPC yet.