aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/interop_matrix/patches
diff options
context:
space:
mode:
authorGravatar Alex Polcyn <apolcyn@google.com>2017-11-15 00:32:50 +0000
committerGravatar Alexander Polcyn <apolcyn@google.com>2017-12-06 15:09:10 -0800
commit8426329120a4a0abaf46c68abf35e53515149995 (patch)
treeafaa8a198acc0f17619505a6fce983c9dc74430d /tools/interop_matrix/patches
parent650595ea15f50dfee318fbe116be96afe0fab191 (diff)
Apply patches to ruby 101 docker image during upload script, for
compatibility tests.
Diffstat (limited to 'tools/interop_matrix/patches')
-rw-r--r--tools/interop_matrix/patches/README.md38
-rw-r--r--tools/interop_matrix/patches/ruby_v1.0.1/git_repo.patch34
2 files changed, 72 insertions, 0 deletions
diff --git a/tools/interop_matrix/patches/README.md b/tools/interop_matrix/patches/README.md
new file mode 100644
index 0000000000..0c0893f6f2
--- /dev/null
+++ b/tools/interop_matrix/patches/README.md
@@ -0,0 +1,38 @@
+# Patches to grpc repo tags for the backwards compatibility interop tests
+
+This directory has patch files that can be applied to different tags
+of the grpc git repo in order to run the interop tests for a specific
+language based on that tag.
+
+For example, because the ruby interop tests do not run on the v1.0.1 tag out
+of the box, but we still want to test compatibility of the 1.0.1 ruby release
+with other versions, we can apply a patch to the v1.0.1 tag from this directory
+that makes the necessary changes that are needed to run the ruby interop tests
+from that tag. We can then use that patch to build the docker image for the
+ruby v1.0.1 interop tests.
+
+## How to add a new patch to this directory
+
+Patch files in this directory are meant to be applied to a git tag
+with a `git apply` command.
+
+1. Under the `patches` directory, create a new subdirectory
+titled `<language>_<git_tag>` for the git tag being modified.
+
+2. `git checkout <git_tag>`
+
+3. Make necessary modifications to the git repo at that tag.
+
+4.
+
+```
+git diff > ~/git_repo.patch
+git checkout <current working branch>
+cp ~/git_repo.patch tools/interop_matrix/patches/<language>_<git_tag>/
+```
+
+5. Edit the `LANGUAGE_RELEASE_MATRIX` in `client_matrix.py` for your language/tag
+and add a `'patch': [<files>,....]` entry to it's `dictionary`.
+
+After doing this, the interop image creation script can apply that patch to the
+tag with `git apply` before uploading to the test image repo.
diff --git a/tools/interop_matrix/patches/ruby_v1.0.1/git_repo.patch b/tools/interop_matrix/patches/ruby_v1.0.1/git_repo.patch
new file mode 100644
index 0000000000..0cd92d691d
--- /dev/null
+++ b/tools/interop_matrix/patches/ruby_v1.0.1/git_repo.patch
@@ -0,0 +1,34 @@
+diff --git a/tools/dockerfile/interoptest/grpc_interop_ruby/Dockerfile b/tools/dockerfile/interoptest/grpc_interop_ruby/Dockerfile
+index 88b5130..7ae9f7d 100644
+--- a/tools/dockerfile/interoptest/grpc_interop_ruby/Dockerfile
++++ b/tools/dockerfile/interoptest/grpc_interop_ruby/Dockerfile
+@@ -70,12 +70,12 @@ RUN apt-get update && apt-get install -y time && apt-get clean
+ RUN gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
+ RUN \curl -sSL https://get.rvm.io | bash -s stable
+
+-# Install Ruby 2.1
+-RUN /bin/bash -l -c "rvm install ruby-2.1"
+-RUN /bin/bash -l -c "rvm use --default ruby-2.1"
++# Install Ruby 2.1.8
++RUN /bin/bash -l -c "rvm install ruby-2.1.8"
++RUN /bin/bash -l -c "rvm use --default ruby-2.1.8"
+ RUN /bin/bash -l -c "echo 'gem: --no-ri --no-rdoc' > ~/.gemrc"
+ RUN /bin/bash -l -c "echo 'export PATH=/usr/local/rvm/bin:$PATH' >> ~/.bashrc"
+-RUN /bin/bash -l -c "echo 'rvm --default use ruby-2.1' >> ~/.bashrc"
++RUN /bin/bash -l -c "echo 'rvm --default use ruby-2.1.8' >> ~/.bashrc"
+ RUN /bin/bash -l -c "gem install bundler --no-ri --no-rdoc"
+
+ # Prepare ccache
+diff --git a/tools/dockerfile/interoptest/grpc_interop_ruby/build_interop.sh b/tools/dockerfile/interoptest/grpc_interop_ruby/build_interop.sh
+index 97b3860..cec046d 100755
+--- a/tools/dockerfile/interoptest/grpc_interop_ruby/build_interop.sh
++++ b/tools/dockerfile/interoptest/grpc_interop_ruby/build_interop.sh
+@@ -38,7 +38,7 @@ git clone --recursive /var/local/jenkins/grpc /var/local/git/grpc
+ cp -r /var/local/jenkins/service_account $HOME || true
+
+ cd /var/local/git/grpc
+-rvm --default use ruby-2.1
++rvm --default use ruby-2.1.8
+
+ # build Ruby interop client and server
+ (cd src/ruby && gem update bundler && bundle && rake compile)