Граф коммитов

9 Коммитов

Автор SHA1 Сообщение Дата
Michael Berlin 622df68d43 bootstrap: Install protobuf gRPC Python plugin via PyPi and do not compile it from a Git checkout.
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>
2018-04-08 16:46:14 -07:00
Michael Demmer 9e39364bdb disable codeclimate maintainability checks 2017-12-20 20:51:06 -08:00
Michael Demmer 3036a8cd8a disable duplication engine in codeclimate 2017-12-20 20:51:06 -08:00
Rafael Chacon 5671e4fff8 Updaste gRPC version to match the go one 2017-12-08 15:10:31 -08:00
Rafael Chacon 995767313a Ignore decorator in codeclimate
* Also fix underlying calls to channel methods
2017-12-05 14:07:48 -08:00
Guido Iaquinti e280889392 Add shellcheck to .codeclimate.yml 2017-10-12 10:35:47 +01:00
Michael Berlin 9c6f493055 CodeClimate: Fix entry for "govet" (copy&paste error). 2017-05-10 10:12:20 -07:00
Michael Berlin 9c55d31c31 CodeClimate: Ignore generated Go code.
This list is currently in sync with the exceptions which we have in our
precommit hooks.
2017-05-09 23:20:00 -07:00
Michael Berlin 0f9f5d03ca Configure CodeClimate. Enable all Go engines.
CodeClimate should run gofmt, golint and govet on every pull request for
us and post the result as a status. This will make it easier to find out
if somebody (accidentally) skipped our Git precommit hooks which run the
same tools.
2017-05-09 22:55:53 -07:00