Use go1.19 for go interop tests and for future interop_matrix tests (#31732)

pull/31754/head
Doug Fawley 2 years ago committed by GitHub
parent 0c5a17ce62
commit a65382d9f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      templates/tools/dockerfile/interoptest/grpc_interop_go/Dockerfile.template
  2. 23
      templates/tools/dockerfile/interoptest/grpc_interop_go1.19/Dockerfile.template
  3. 3
      templates/tools/dockerfile/interoptest/grpc_interop_go1.19/build_interop.sh.template
  4. 2
      tools/dockerfile/interoptest/grpc_interop_go.current_version
  5. 2
      tools/dockerfile/interoptest/grpc_interop_go/Dockerfile
  6. 1
      tools/dockerfile/interoptest/grpc_interop_go1.19.current_version
  7. 46
      tools/dockerfile/interoptest/grpc_interop_go1.19/Dockerfile
  8. 33
      tools/dockerfile/interoptest/grpc_interop_go1.19/build_interop.sh
  9. 2
      tools/interop_matrix/client_matrix.py

@ -13,11 +13,10 @@
# 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 golang:1.16
FROM golang:1.19
<%include file="../../go_path.include"/>
<%include file="../../run_tests_python_deps.include"/>
# Define the default command.
CMD ["bash"]

@ -0,0 +1,23 @@
%YAML 1.2
--- |
# Copyright 2021 The 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 golang:1.19
<%include file="../../go_path.include"/>
<%include file="../../run_tests_python_deps.include"/>
# Define the default command.
CMD ["bash"]

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

@ -1 +1 @@
us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_interop_go:5634d60fe93a78b23d8fb00f31228f94dd1c1849@sha256:d5b2b0c02e7a8196fea704196a8221994983c22eece2ac2324e095e8972a957f
us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_interop_go:5077f63e1d205d08fd1029bd3ac52ca9d9c12810@sha256:889e7ff34399a5e16af87940d1eaa239e56da307f7faca3f8f1d28379c2e3df3

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
FROM golang:1.16
FROM golang:1.19
# Using login shell removes Go from path, so we add it.
RUN ln -s /usr/local/go/bin/go /usr/local/bin

@ -0,0 +1 @@
us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_interop_go1.19:5077f63e1d205d08fd1029bd3ac52ca9d9c12810@sha256:889e7ff34399a5e16af87940d1eaa239e56da307f7faca3f8f1d28379c2e3df3

@ -0,0 +1,46 @@
# Copyright 2021 The 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 golang:1.19
# Using login shell removes Go from path, so we add it.
RUN ln -s /usr/local/go/bin/go /usr/local/bin
#====================
# run_tests.py python dependencies
# Basic python dependencies to be able to run tools/run_tests python scripts
# These dependencies are not sufficient to build gRPC Python, gRPC Python
# deps are defined elsewhere (e.g. python_deps.include)
RUN apt-get update && apt-get install -y \
python3 \
python3-pip \
python3-setuptools \
python3-yaml \
&& apt-get clean
# use pinned version of pip to avoid sudden breakages
RUN python3 -m pip install --upgrade pip==19.3.1
# TODO(jtattermusch): currently six is needed for tools/run_tests scripts
# but since our python2 usage is deprecated, we should get rid of it.
RUN python3 -m pip install six==1.16.0
# Google Cloud Platform API libraries
# These are needed for uploading test results to BigQuery (e.g. by tools/run_tests scripts)
RUN python3 -m pip install --upgrade google-auth==1.23.0 google-api-python-client==1.12.8 oauth2client==4.1.0
# Define the default command.
CMD ["bash"]

@ -0,0 +1,33 @@
#!/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 Go interop server and client in a base image.
set -e
# Turn on support for Go modules.
export GO111MODULE=on
# Clone just the grpc-go source code without any dependencies.
# We are cloning from a local git repo that contains the right revision
# to test instead of using "go get" to download from Github directly.
git clone --recursive /var/local/jenkins/grpc-go src/google.golang.org/grpc
# copy service account keys if available
cp -r /var/local/jenkins/service_account $HOME || true
# Build the interop client and server
(cd src/google.golang.org/grpc/interop/client && go install)
(cd src/google.golang.org/grpc/interop/server && go install)

@ -53,7 +53,7 @@ def should_build_docker_interop_image_from_release_tag(lang):
# Dictionary of default runtimes per language
LANG_RUNTIME_MATRIX = {
'cxx': ['cxx'], # This is actually debian8.
'go': ['go1.8', 'go1.11', 'go1.16'],
'go': ['go1.8', 'go1.11', 'go1.16', 'go1.19'],
'java': ['java'],
'python': ['python', 'pythonasyncio'],
'node': ['node'],

Loading…
Cancel
Save