The expected location of config files has changed, but we were still
installing them in the old location. This also adds a symlink from the
old location to remain backwards-compatible.
Signed-off-by: Anthony Yeh <enisoc@planetscale.com>
The protoc generated code was not matching the goimports standard.
I've added a goimports step after the build.
This caused another breakage because time.proto did not match its
package name of vttime. I've fixed that also.
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
Due to an import pathing restriction in protoc, we still need the
source tree to represent the import names in the packages.
This workaround makes the build work for those who have their
github branch checked out this way.
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
- Crashed vttablet in the prometheus client code.
- Replace dots with underscores in tablenames on the way in
- Switch to prometheus non-panic functions.
- Add Makefile option to build non-optimized (debug) binaries.
Signed-off-by: Jacques Grove <aquarapid@gmail.com>
This commit overhauls the dockerfiles, specifically it
1. Converts the lite builds to use a multi-stage build to allow easier
automation
2. Adds in new versions of mysql and mariadb
3. Updates the dockerfiles to use the full gpg key hash to provent
collisions
4. Updates the make file with new targets
Signed-off-by: Dan Kozlowski <koz@planetscale.com>
Right now the user is set in the bootstrap containers. This causes an error when building with CGO_ENABLED=0 This change removes the user being set in the base docker containers and moves it downstream to the
base and lite containers
Signed-off-by: Dan Kozlowski <koz@planetscale.com>
Also, simplify the protoc call by removing some intermediate tools and steps involving the python grpcio-tools wrapper.
The motivation for changing the build was that I had trouble getting the old build to work. It might just have been me.
This approach is arguably simpler because it involves fewer tools, no temp files, and no calling "sed" on the output.
Signed-off-by: David Weitzman <dweitzman@pinterest.com>
Tested:
- I've rebuilt bootstrap docker images locally and all tests passed on them.
- I ran `bootstrap.sh` and `make proto` manually on my Linux workstation and my MacOS laptop.
History of changes for references:
- https://github.com/vitessio/vitess/pull/3220 - I got rid of compiling gRPC from source. Because of that, the gRPC Python plugin was no longer installed and "make proto" stopped working.
- https://github.com/vitessio/vitess/pull/3461 - This PR reverted my changes and changed back to compile gRPC from source again. However, that would not have been necessary in the first place. The "grpcio-tools" package has the protobuf compiler and the protobuf gRPC Python plugin. See: https://grpc.io/docs/quickstart/python.html#install-grpc-tools
- https://github.com/vitessio/vitess/pull/3516 - This PR removed the gRPC compilation, but still compiled the protobuf gRPC Python plugin.
Note: As part of the now removed Python plugin compilation, we also had a compiled "protoc" binary. Since we will no longer have this binary, we're using the recommended procedure from the "grpcio-tools" package instead. See: https://grpc.io/docs/quickstart/python.html#generate-grpc-code They provide a Python wrapper script around a shared library of the "protoc" compiler, but not a binary anymore. Therefore, we have to call "python -m grpc_tools.protoc" to invoke the protobuf compiler.
Other changes:
- This protobuf compiler knows the Python plugin by default and does not require the --plugin flag for generating the Python services.
- In contrast, --plugin is now required to pass the gRPC Go plugin.
- The Python plugin changed its flag from --grpc_out to --grpc_python_out.
- The Python plugin emits different files since gRPC 1.7.0. I'll regenerate the files in a separate commit. See: https://github.com/grpc/grpc/releases/tag/v1.7.0
- Removed unlinking and linking back of Homebrew "protobuf" package. It looks to me like an existing package should not interfere with our virtualenv environment.
- Removed cleanup call where we deleted the obsolete $VTROOT/dist/protobuf directory. If users still have that directory on disk, they can delete it manually themselves. Existing directories should not interfere with the new approach.
Signed-off-by: Michael Berlin <mberlin@google.com>
Also, require a re-build of base image, as we want to make sure we
release what is latest.
Signed-off-by: Arthur Neves <arthurnn@gmail.com>
Signed-off-by: Arthur Neves <arthurnn@gmail.com>
now you can run: `make release VERSION=2.2`
which will cut a release, update the libs and generate a .tar.gz
file into the releases folder."
Signed-off-by: Arthur Neves <arthurnn@gmail.com>
This is to completely clean up your working environment without touching
anything that's local in the git repo. Reasons for this are when changing
the go binaries or wanting to be sure your repo is clean.