|
3 주 전 | |
---|---|---|
.. | ||
patches | 3 주 전 | |
testcases | 3 주 전 | |
README.md | 3 주 전 | |
client_matrix.py | 3 주 전 | |
create_matrix_images.py | 3 주 전 | |
create_testcases.sh | 3 주 전 | |
run_interop_matrix_tests.py | 3 주 전 |
This directory contains scripts that facilitate building and running gRPC interoperability tests for combinations of language/runtimes (known as matrix).
The setup builds gRPC docker images for each language/runtime and upload it to Google Container Registry (GCR). These images, encapsulating gRPC stack from specific releases/tag, are used to test version compatibility between gRPC release versions.
We have continuous nightly test setup to test gRPC backward compatibility between old clients and latest server. When a gRPC developer creates a new gRPC release, s/he is also responsible to add the just-released gRPC client to the nightly test. The steps are:
./client_matrix.py
file to reference the github tag for the release.v1.9.9
, do
tools/interop_matrix/create_matrix_images.py --git_checkout --release=v1.9.9 --upload_images --language cxx csharp python ruby php
gcloud container images list --repository gcr.io/grpc-testing
lists available images.gcloud container images list-tags gcr.io/grpc-testing/grpc_interop_java
should show an image entry with tag v1.9.9
.gcloud docker -- pull gcr.io/grpc-testing/grpc_interop_java:v1.9.9
followed bydocker_image=gcr.io/grpc-testing/grpc_interop_java:v1.9.9 tools/interop_matrix/testcases/java__master
/export/hda3/tmp/grpc_matrix/
.
For more details on each step, refer to sections below.Dockerfile.template
, build_interop.sh.template
for the language/runtime under template/tools/dockerfile/
.tools/buildgen/generate_projects.sh
to create corresponding files under tools/dockerfile/
.client_matrix.py
following existing language/runtimes examples.tools/interop_matrix/create_matrix_images.py
which will build (and upload) images to GCR.LANG=<lang> [RELEASE=<release>] ./create_testcases.sh
. For example,
LANG=go ./create_testcases.sh
will generate ./testcases/go__master
, which is also a functional bash script.LANG=go KEEP_IMAGE=1 ./create_testcases.sh
will generate ./testcases/go__master
and keep the local docker image so it can be invoked simply via ./testcases/go__master
. Note: remove local docker images manually afterwards with docker rmi <image_id>
../testcases/<lang>__<release>
.tools/interop_matrix/run_interop_matrix_tests.py
. Useful options:
--release
specifies a git release tag. Defaults to --release=all
. Make sure the GCR images with the tag have been created using create_matrix_images.py
above.--language
specifies a language. Defaults to --language=all
.
For example, To test all languages for all gRPC releases across all runtimes, do tools/interop_matrix/run_interop_matrix_test.py --release=all
.gcloud docker -- pull gcr.io/grpc-testing/grpc_interop_go1.8:v1.16.0
.docker_image
variable inline with the test case script created above.
For example:
docker_image=gcr.io/grpc-testing/grpc_interop_go1.8:v1.16.0 ./testcases/go__master
will run go__master test cases against go1.8
with gRPC release v1.16.0
docker image in GCR.Note:
tools/
or template/
are relative to the grpc repo root dir. File path starting with ./
are relative to current directory (tools/interop_matrix
).