Merge pull request #19137 from ejona86/openjdk8

Swap java interop tests to openjdk8
pull/19175/head
Jan Tattermusch 6 years ago committed by GitHub
commit ff30b51058
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      templates/tools/dockerfile/interoptest/grpc_interop_java/Dockerfile.include
  2. 3
      templates/tools/dockerfile/interoptest/grpc_interop_java/Dockerfile.template
  3. 2
      templates/tools/dockerfile/interoptest/grpc_interop_java/build_interop.sh.template
  4. 17
      templates/tools/dockerfile/interoptest/grpc_interop_java/java_deps.include
  5. 3
      templates/tools/dockerfile/interoptest/grpc_interop_java_oracle8/Dockerfile.template
  6. 3
      templates/tools/dockerfile/interoptest/grpc_interop_java_oracle8/build_interop.sh.template
  7. 12
      templates/tools/dockerfile/interoptest/grpc_interop_java_oracle8/java_deps.include
  8. 18
      tools/dockerfile/interoptest/grpc_interop_java/Dockerfile
  9. 2
      tools/dockerfile/interoptest/grpc_interop_java/build_interop.sh
  10. 34
      tools/dockerfile/interoptest/grpc_interop_java_oracle8/Dockerfile
  11. 44
      tools/dockerfile/interoptest/grpc_interop_java_oracle8/build_interop.sh
  12. 6
      tools/interop_matrix/README.md
  13. 100
      tools/interop_matrix/client_matrix.py

@ -14,7 +14,11 @@
<%include file="../../debian_jessie_header.include"/>
<%include file="java_deps.include"/>
RUN echo "deb http://archive.debian.org/debian/ jessie-backports main contrib non-free" > /etc/apt/sources.list.d/jessie-backports.list && ${'\\'}
echo 'Acquire::Check-Valid-Until no;' > /etc/apt/apt.conf.d/99no-check-valid-until && ${'\\'}
apt-get update && ${'\\'}
apt-get install -y --no-install-recommends -t jessie-backports openjdk-8-jdk-headless && ${'\\'}
apt-get clean
# Define the default command.
CMD ["bash"]

@ -1,4 +1,3 @@
%YAML 1.2
--- |
<%include file="../grpc_interop_java_oracle8/Dockerfile.include"/>
<%include file="Dockerfile.include"/>

@ -1,3 +1,3 @@
%YAML 1.2
--- |
<%include file="../../java_build_interop.sh.include"/>
<%include file="../../java_build_interop.sh.include"/>

@ -1,17 +0,0 @@
# Install JDK 8 and Git
#
RUN echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections && ${'\\'}
echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee /etc/apt/sources.list.d/webupd8team-java.list && ${'\\'}
echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list && ${'\\'}
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886
RUN apt-get update && apt-get -y install ${'\\'}
git ${'\\'}
libapr1 ${'\\'}
oracle-java8-installer ${'\\'}
&& ${'\\'}
apt-get clean && rm -r /var/cache/oracle-jdk8-installer/
ENV JAVA_HOME /usr/lib/jvm/java-8-oracle
ENV PATH $PATH:$JAVA_HOME/bin

@ -1,3 +0,0 @@
%YAML 1.2
--- |
<%include file="Dockerfile.include"/>

@ -1,3 +0,0 @@
%YAML 1.2
--- |
<%include file="../../java_build_interop.sh.include"/>

@ -1,12 +0,0 @@
# Install JDK 8
#
RUN echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections && ${'\\'}
echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee /etc/apt/sources.list.d/webupd8team-java.list && ${'\\'}
echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list && ${'\\'}
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886 && ${'\\'}
apt-get update && apt-get -y install oracle-java8-installer && ${'\\'}
apt-get clean && rm -r /var/cache/oracle-jdk8-installer/
ENV JAVA_HOME /usr/lib/jvm/java-8-oracle
ENV PATH $PATH:$JAVA_HOME/bin

@ -15,19 +15,11 @@
FROM debian:jessie
# Install JDK 8
#
RUN echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections && \
echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee /etc/apt/sources.list.d/webupd8team-java.list && \
echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list && \
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886 && \
apt-get update && apt-get -y install oracle-java8-installer && \
apt-get clean && rm -r /var/cache/oracle-jdk8-installer/
ENV JAVA_HOME /usr/lib/jvm/java-8-oracle
ENV PATH $PATH:$JAVA_HOME/bin
RUN echo "deb http://archive.debian.org/debian/ jessie-backports main contrib non-free" > /etc/apt/sources.list.d/jessie-backports.list && \
echo 'Acquire::Check-Valid-Until no;' > /etc/apt/apt.conf.d/99no-check-valid-until && \
apt-get update && \
apt-get install -y --no-install-recommends -t jessie-backports openjdk-8-jdk-headless && \
apt-get clean
# Define the default command.
CMD ["bash"]

@ -41,4 +41,4 @@ java.util.logging.ConsoleHandler.level = ALL
.level = FINE
io.grpc.netty.NettyClientHandler = ALL
io.grpc.netty.NettyServerHandler = ALL" > /var/local/grpc_java_logging/logconf.txt

@ -1,34 +0,0 @@
# Copyright 2017 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
FROM debian:jessie
# Install JDK 8
#
RUN echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections && \
echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee /etc/apt/sources.list.d/webupd8team-java.list && \
echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list && \
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886 && \
apt-get update && apt-get -y install oracle-java8-installer && \
apt-get clean && rm -r /var/cache/oracle-jdk8-installer/
ENV JAVA_HOME /usr/lib/jvm/java-8-oracle
ENV PATH $PATH:$JAVA_HOME/bin
# Define the default command.
CMD ["bash"]

@ -1,44 +0,0 @@
#!/bin/bash
# Copyright 2015 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Builds Java interop server and client in a base image.
set -e
cp -r /var/local/jenkins/grpc-java /tmp/grpc-java
# copy service account keys if available
cp -r /var/local/jenkins/service_account $HOME || true
pushd /tmp/grpc-java
./gradlew :grpc-interop-testing:installDist -PskipCodegen=true
mkdir -p /var/local/git/grpc-java/
cp -r --parents -t /var/local/git/grpc-java/ \
interop-testing/build/install/ \
run-test-client.sh \
run-test-server.sh
popd
rm -r /tmp/grpc-java
rm -r "$HOME/.gradle"
# enable extra java logging
mkdir -p /var/local/grpc_java_logging
echo "handlers = java.util.logging.ConsoleHandler
java.util.logging.ConsoleHandler.level = ALL
.level = FINE
io.grpc.netty.NettyClientHandler = ALL
io.grpc.netty.NettyServerHandler = ALL" > /var/local/grpc_java_logging/logconf.txt

@ -12,11 +12,11 @@ We have continuous nightly test setup to test gRPC backward compatibility betwee
- `tools/interop_matrix/create_matrix_images.py --git_checkout --release=v1.9.9 --upload_images --language cxx csharp python ruby php`
- Verify that the new docker image was built successfully and uploaded to GCR. For example,
- `gcloud container images list --repository gcr.io/grpc-testing` lists available images.
- `gcloud container images list-tags gcr.io/grpc-testing/grpc_interop_java_oracle8` should show an image entry with tag `v1.9.9`.
- `gcloud container images list-tags gcr.io/grpc-testing/grpc_interop_java` should show an image entry with tag `v1.9.9`.
- images can also be viewed in https://pantheon.corp.google.com/gcr/images/grpc-testing?project=grpc-testing
- Verify the just-created docker client image would pass backward compatibility test (it should). For example,
- `gcloud docker -- pull gcr.io/grpc-testing/grpc_interop_java_oracle8:v1.9.9` followed by
- `docker_image=gcr.io/grpc-testing/grpc_interop_java_oracle8:v1.9.9 tools/interop_matrix/testcases/java__master`
- `gcloud docker -- pull gcr.io/grpc-testing/grpc_interop_java:v1.9.9` followed by
- `docker_image=gcr.io/grpc-testing/grpc_interop_java:v1.9.9 tools/interop_matrix/testcases/java__master`
- git commit the change and merge it to upstream/master.
- (Optional) clean up the tmp directory to where grpc source is cloned at `/export/hda3/tmp/grpc_matrix/`.
For more details on each step, refer to sections below.

@ -37,12 +37,8 @@ def get_runtimes_for_lang_release(lang, release):
"""Get list of valid runtimes for given release of lang."""
runtimes = list(LANG_RUNTIME_MATRIX[lang])
release_info = LANG_RELEASE_MATRIX[lang].get(release)
if release_info and release_info.runtime_subset:
runtimes = list(release_info.runtime_subset)
# check that all selected runtimes are valid for given language
for runtime in runtimes:
assert runtime in LANG_RUNTIME_MATRIX[lang]
if release_info and release_info.runtimes:
runtimes = list(release_info.runtimes)
return runtimes
@ -55,11 +51,11 @@ def should_build_docker_interop_image_from_release_tag(lang):
return True
# Dictionary of runtimes per language
# Dictionary of default runtimes per language
LANG_RUNTIME_MATRIX = {
'cxx': ['cxx'], # This is actually debian8.
'go': ['go1.8', 'go1.11'],
'java': ['java_oracle8'],
'java': ['java'],
'python': ['python'],
'node': ['node'],
'ruby': ['ruby'],
@ -71,9 +67,9 @@ LANG_RUNTIME_MATRIX = {
class ReleaseInfo:
"""Info about a single release of a language"""
def __init__(self, patch=[], runtime_subset=[], testcases_file=None):
def __init__(self, patch=[], runtimes=[], testcases_file=None):
self.patch = patch
self.runtime_subset = runtime_subset
self.runtimes = runtimes
self.testcases_file = testcases_file
@ -104,51 +100,51 @@ LANG_RELEASE_MATRIX = {
]),
'go':
OrderedDict([
('v1.0.5', ReleaseInfo(runtime_subset=['go1.8'])),
('v1.2.1', ReleaseInfo(runtime_subset=['go1.8'])),
('v1.3.0', ReleaseInfo(runtime_subset=['go1.8'])),
('v1.4.2', ReleaseInfo(runtime_subset=['go1.8'])),
('v1.5.2', ReleaseInfo(runtime_subset=['go1.8'])),
('v1.6.0', ReleaseInfo(runtime_subset=['go1.8'])),
('v1.7.4', ReleaseInfo(runtime_subset=['go1.8'])),
('v1.8.2', ReleaseInfo(runtime_subset=['go1.8'])),
('v1.9.2', ReleaseInfo(runtime_subset=['go1.8'])),
('v1.10.1', ReleaseInfo(runtime_subset=['go1.8'])),
('v1.11.3', ReleaseInfo(runtime_subset=['go1.8'])),
('v1.12.2', ReleaseInfo(runtime_subset=['go1.8'])),
('v1.13.0', ReleaseInfo(runtime_subset=['go1.8'])),
('v1.14.0', ReleaseInfo(runtime_subset=['go1.8'])),
('v1.15.0', ReleaseInfo(runtime_subset=['go1.8'])),
('v1.16.0', ReleaseInfo(runtime_subset=['go1.8'])),
('v1.17.0', ReleaseInfo(runtime_subset=['go1.11'])),
('v1.18.0', ReleaseInfo(runtime_subset=['go1.11'])),
('v1.19.0', ReleaseInfo(runtime_subset=['go1.11'])),
('v1.20.0', ReleaseInfo(runtime_subset=['go1.11'])),
('v1.21.0', ReleaseInfo(runtime_subset=['go1.11'])),
('v1.0.5', ReleaseInfo(runtimes=['go1.8'])),
('v1.2.1', ReleaseInfo(runtimes=['go1.8'])),
('v1.3.0', ReleaseInfo(runtimes=['go1.8'])),
('v1.4.2', ReleaseInfo(runtimes=['go1.8'])),
('v1.5.2', ReleaseInfo(runtimes=['go1.8'])),
('v1.6.0', ReleaseInfo(runtimes=['go1.8'])),
('v1.7.4', ReleaseInfo(runtimes=['go1.8'])),
('v1.8.2', ReleaseInfo(runtimes=['go1.8'])),
('v1.9.2', ReleaseInfo(runtimes=['go1.8'])),
('v1.10.1', ReleaseInfo(runtimes=['go1.8'])),
('v1.11.3', ReleaseInfo(runtimes=['go1.8'])),
('v1.12.2', ReleaseInfo(runtimes=['go1.8'])),
('v1.13.0', ReleaseInfo(runtimes=['go1.8'])),
('v1.14.0', ReleaseInfo(runtimes=['go1.8'])),
('v1.15.0', ReleaseInfo(runtimes=['go1.8'])),
('v1.16.0', ReleaseInfo(runtimes=['go1.8'])),
('v1.17.0', ReleaseInfo(runtimes=['go1.11'])),
('v1.18.0', ReleaseInfo(runtimes=['go1.11'])),
('v1.19.0', ReleaseInfo(runtimes=['go1.11'])),
('v1.20.0', ReleaseInfo(runtimes=['go1.11'])),
('v1.21.0', ReleaseInfo(runtimes=['go1.11'])),
]),
'java':
OrderedDict([
('v1.0.3', ReleaseInfo()),
('v1.1.2', ReleaseInfo()),
('v1.2.0', ReleaseInfo()),
('v1.3.1', ReleaseInfo()),
('v1.4.0', ReleaseInfo()),
('v1.5.0', ReleaseInfo()),
('v1.6.1', ReleaseInfo()),
('v1.7.0', ReleaseInfo()),
('v1.8.0', ReleaseInfo()),
('v1.9.1', ReleaseInfo()),
('v1.10.1', ReleaseInfo()),
('v1.11.0', ReleaseInfo()),
('v1.12.0', ReleaseInfo()),
('v1.13.1', ReleaseInfo()),
('v1.14.0', ReleaseInfo()),
('v1.15.0', ReleaseInfo()),
('v1.16.1', ReleaseInfo()),
('v1.17.1', ReleaseInfo()),
('v1.18.0', ReleaseInfo()),
('v1.19.0', ReleaseInfo()),
('v1.20.0', ReleaseInfo()),
('v1.0.3', ReleaseInfo(runtimes=['java_oracle8'])),
('v1.1.2', ReleaseInfo(runtimes=['java_oracle8'])),
('v1.2.0', ReleaseInfo(runtimes=['java_oracle8'])),
('v1.3.1', ReleaseInfo(runtimes=['java_oracle8'])),
('v1.4.0', ReleaseInfo(runtimes=['java_oracle8'])),
('v1.5.0', ReleaseInfo(runtimes=['java_oracle8'])),
('v1.6.1', ReleaseInfo(runtimes=['java_oracle8'])),
('v1.7.0', ReleaseInfo(runtimes=['java_oracle8'])),
('v1.8.0', ReleaseInfo(runtimes=['java_oracle8'])),
('v1.9.1', ReleaseInfo(runtimes=['java_oracle8'])),
('v1.10.1', ReleaseInfo(runtimes=['java_oracle8'])),
('v1.11.0', ReleaseInfo(runtimes=['java_oracle8'])),
('v1.12.0', ReleaseInfo(runtimes=['java_oracle8'])),
('v1.13.1', ReleaseInfo(runtimes=['java_oracle8'])),
('v1.14.0', ReleaseInfo(runtimes=['java_oracle8'])),
('v1.15.0', ReleaseInfo(runtimes=['java_oracle8'])),
('v1.16.1', ReleaseInfo(runtimes=['java_oracle8'])),
('v1.17.1', ReleaseInfo(runtimes=['java_oracle8'])),
('v1.18.0', ReleaseInfo(runtimes=['java_oracle8'])),
('v1.19.0', ReleaseInfo(runtimes=['java_oracle8'])),
('v1.20.0', ReleaseInfo(runtimes=['java_oracle8'])),
]),
'python':
OrderedDict([

Loading…
Cancel
Save