[interop] Use go1.22 for Go master branch interop tests (#36917)

<!--

If you know who should review your pull request, please assign it to that
person, otherwise the pull request would get assigned randomly.

If your pull request is for a specific language, please add the appropriate
lang label.

-->

Similar to https://github.com/grpc/grpc/pull/36755, this PR updates the image used by Go for interop tests that run against master.

Closes #36917

PiperOrigin-RevId: 644024756
pull/36734/head^2
Arjan Singh Bal 5 months ago committed by Copybara-Service
parent 205783fc4f
commit 426df93434
  1. 5
      templates/tools/dockerfile/interoptest/grpc_interop_go/Dockerfile.template
  2. 2
      tools/bazelify_tests/dockerimage_current_versions.bzl
  3. 2
      tools/dockerfile/interoptest/grpc_interop_go.current_version
  4. 25
      tools/dockerfile/interoptest/grpc_interop_go/Dockerfile

@ -14,9 +14,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
FROM golang:1.19
FROM golang:latest
<%include file="../../go_path.include"/>
<%include file="../../run_tests_python_deps.include"/>
<%include file="../../run_tests_python_deps_venv.include"/>
# Define the default command.
CMD ["bash"]

@ -73,7 +73,7 @@ DOCKERIMAGE_CURRENT_VERSIONS = {
"tools/dockerfile/interoptest/grpc_interop_aspnetcore.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_interop_aspnetcore@sha256:8e2e732e78724a8382c340dca72e7653c5f82c251a3110fa2874cc00ba538878",
"tools/dockerfile/interoptest/grpc_interop_cxx.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_interop_cxx@sha256:e5a474d33773d52ec6a8abbe2d61ee0c2a9c2b5f48793a5ea3b82c4445becf3f",
"tools/dockerfile/interoptest/grpc_interop_dart.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_interop_dart@sha256:4915a280788126dad029858eb384dbbef2dc18cadccb434df6450dfd7a4929f2",
"tools/dockerfile/interoptest/grpc_interop_go.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_interop_go@sha256:889e7ff34399a5e16af87940d1eaa239e56da307f7faca3f8f1d28379c2e3df3",
"tools/dockerfile/interoptest/grpc_interop_go.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_interop_go@sha256:9d02b61552a93770ebb022f588daf9acd1088d29197fe120e0b082ede73f4584",
"tools/dockerfile/interoptest/grpc_interop_go1.11.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_interop_go1.11@sha256:f2fe3a0a581c687ee4217bf58fd42b18bb1f63d3d006f1b67379ff553b0e23c6",
"tools/dockerfile/interoptest/grpc_interop_go1.16.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_interop_go1.16@sha256:3767f47c9d06584c6c07b7ab536e13f3e87550330e6c2652ad288d3a72b0de23",
"tools/dockerfile/interoptest/grpc_interop_go1.19.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_interop_go1.19@sha256:889e7ff34399a5e16af87940d1eaa239e56da307f7faca3f8f1d28379c2e3df3",

@ -1 +1 @@
us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_interop_go:5077f63e1d205d08fd1029bd3ac52ca9d9c12810@sha256:889e7ff34399a5e16af87940d1eaa239e56da307f7faca3f8f1d28379c2e3df3
us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_interop_go:98dba9a99a13bf3cd11a4ebdde4fea2e3eaa9b41@sha256:9d02b61552a93770ebb022f588daf9acd1088d29197fe120e0b082ede73f4584

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
FROM golang:1.19
FROM golang:latest
# Using login shell removes Go from path, so we add it.
RUN ln -s /usr/local/go/bin/go /usr/local/bin
@ -23,23 +23,34 @@ RUN ln -s /usr/local/go/bin/go /usr/local/bin
# 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)
# This template is similar to run_tests_python_deps.include but installs the
# dependencies in a python virtual environment. This is required from pip 23.0
# onwards as installation of system-wide packages is blocked by default.
RUN apt-get update && apt-get install -y \
python3 \
python3-pip \
python3-setuptools \
python3-yaml \
python3-venv \
&& apt-get clean
# use pinned version of pip to avoid sudden breakages
RUN python3 -m pip install --upgrade pip==19.3.1
# Create a python virtual env for installing required dependencies.
ENV PYTHON_ENV="/opt/venv/grpc-interop"
RUN python3 -m venv "$PYTHON_ENV"
RUN echo "source $PYTHON_ENV/bin/activate" >> ~/.bashrc
# TODO(jtattermusch): currently six is needed for tools/run_tests scripts
# Use bash explicitly as /bin/sh doesn't support the "source" command.
# use pinned version of pip to avoid sudden breakages
# TODO(#36814): 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
RUN /bin/bash -c "source $PYTHON_ENV/bin/activate && python3 -m pip install --upgrade pip==19.3.1 && python3 -m pip install six==1.16.0"
# Google Cloud Platform API libraries
# Install 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
# This template is similar to gcp_api_libraries.include but installs the
# dependencies in a python virtual environment. This is required from pip 23.0
# onwards as installation of system-wide packages is blocked by default.
RUN /bin/bash -c "source $PYTHON_ENV/bin/activate && 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.

Loading…
Cancel
Save