[csharp] Fix csharp_ubuntu2204_x64 docker image (#36019)

Fix the docker image for C# distribution tests - csharp_ubuntu2204_x64

The package that installed the .NET 7.0 SDK is missing setting up links and thus the `dotnet` command cannot find the SDK. Setting this links has been added to the dockerfile.

**NOTE**: I'm unable to update `tools/dockerfile/distribtest/csharp_ubuntu2204_x64.current_version` as I don't have access to the artifact registry.

Closes #36019

PiperOrigin-RevId: 611590679
pull/36032/head
tony 11 months ago committed by Copybara-Service
parent 73c141cb57
commit 5043eb4d65
  1. 2
      tools/bazelify_tests/dockerimage_current_versions.bzl
  2. 2
      tools/dockerfile/distribtest/csharp_ubuntu2204_x64.current_version
  3. 2
      tools/dockerfile/distribtest/csharp_ubuntu2204_x64/Dockerfile
  4. 3
      tools/run_tests/artifacts/distribtest_targets.py

@ -34,7 +34,7 @@ DOCKERIMAGE_CURRENT_VERSIONS = {
"tools/dockerfile/distribtest/csharp_debian10_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/csharp_debian10_x64@sha256:98cf90c3039940e2f220d1c63688428aa14bb35e89e37894e999b3490001197b",
"tools/dockerfile/distribtest/csharp_dotnet31_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/csharp_dotnet31_x64@sha256:aeea1911ea20606bb409e9b8ac68c7b4127fee2be7dcbf9382f2a26b9c865ed0",
"tools/dockerfile/distribtest/csharp_dotnet5_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/csharp_dotnet5_x64@sha256:2cf597a37f77da51f606b603ee2923c5fac604ab355d316c31059e1c4daef24f",
"tools/dockerfile/distribtest/csharp_ubuntu2204_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/csharp_ubuntu2204_x64@sha256:b21dd7a9d0492a974cb4b287bf22b6d595664895cc81b3e37b5cca53e885b941",
"tools/dockerfile/distribtest/csharp_ubuntu2204_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/csharp_ubuntu2204_x64@sha256:4d17c8394af37687e588a732947c82ca7efca1f58397047569614bffc902bf02",
"tools/dockerfile/distribtest/php7_debian10_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/php7_debian10_x64@sha256:e760a60f2dce2dada571d9b07447a9f99ffeeb366a309dbbb5dc0a43991c22dc",
"tools/dockerfile/distribtest/python_alpine_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/python_alpine_x64@sha256:699ac7b86199406fa27e88f30a1c623ef34ac33f6d9330fd13a6f6457ee4e19f",
"tools/dockerfile/distribtest/python_arch_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/python_arch_x64@sha256:2c1adadeb010e107132cf5137f32a2d18727796631245b110cc74f69c07502e1",

@ -1 +1 @@
us-docker.pkg.dev/grpc-testing/testing-images-public/csharp_ubuntu2204_x64:50bd65f5e356f8956565d27bb6d1729c56d4a2d0@sha256:b21dd7a9d0492a974cb4b287bf22b6d595664895cc81b3e37b5cca53e885b941
us-docker.pkg.dev/grpc-testing/testing-images-public/csharp_ubuntu2204_x64:abfc4dfc1139b6a0ca4716b848ff06c12976d226@sha256:4d17c8394af37687e588a732947c82ca7efca1f58397047569614bffc902bf02

@ -23,6 +23,8 @@ RUN dpkg -i packages-microsoft-prod.deb
RUN rm packages-microsoft-prod.deb
RUN apt-get update && apt-get install -y dotnet-sdk-7.0
# Set up links so that the dotnet command can find the installed SDK
RUN for f in /usr/share/dotnet/* ; do ln -s $f /usr/lib/dotnet ; done
# we only want to test dotnet core 6.0 runtime. This also allows us to keep
# this docker image minimal by not installing the other runtimes.

@ -429,8 +429,7 @@ def targets():
CSharpDistribTest(
"linux", "x64", "debian10", use_dotnet_cli=True, presubmit=True
),
# TODO(apolcyn): unskip ubuntu2204 after fixing dotnet SDK installation.
# CSharpDistribTest("linux", "x64", "ubuntu2204", use_dotnet_cli=True),
CSharpDistribTest("linux", "x64", "ubuntu2204", use_dotnet_cli=True),
CSharpDistribTest(
"linux", "x64", "alpine", use_dotnet_cli=True, presubmit=True
),

Loading…
Cancel
Save