From 2710626b234d5e387a3c63988ca5899c70547dcf Mon Sep 17 00:00:00 2001 From: Curt Hagenlocher Date: Fri, 26 Apr 2024 06:26:42 -0700 Subject: [PATCH] GH-41375: [C#] Move to .NET 8.0 (#41376) ### What changes are included in this PR? Changes to workflow infrastructure and projects to install and target net8.0 instead of net7.0. ### Are these changes tested? Yes ### Are there any user-facing changes? Users will need to install .NET 8 to run tests and examples. No impact on product code. Closes #41375 * GitHub Issue: #41375 Lead-authored-by: Curt Hagenlocher Co-authored-by: Sutou Kouhei Signed-off-by: Curt Hagenlocher --- .env | 2 +- .github/workflows/csharp.yml | 6 +++--- .github/workflows/dev.yml | 2 +- ci/docker/conda-integration.dockerfile | 2 +- ci/docker/ubuntu-22.04-csharp.dockerfile | 2 +- .../FlightAspServerExample/FlightAspServerExample.csproj | 2 +- .../examples/FlightClientExample/FlightClientExample.csproj | 2 +- .../FluentBuilderExample/FluentBuilderExample.csproj | 2 +- .../Apache.Arrow.Benchmarks/Apache.Arrow.Benchmarks.csproj | 2 +- .../Apache.Arrow.Compression.Tests.csproj | 2 +- .../Apache.Arrow.Flight.Sql.Tests.csproj | 2 +- .../Apache.Arrow.Flight.TestWeb.csproj | 2 +- .../Apache.Arrow.Flight.Tests.csproj | 2 +- .../Apache.Arrow.IntegrationTest.csproj | 2 +- csharp/test/Apache.Arrow.Tests/Apache.Arrow.Tests.csproj | 6 ++++-- dev/archery/archery/integration/tester_csharp.py | 6 +++--- dev/release/verify-release-candidate.sh | 4 ++-- dev/tasks/verify-rc/github.macos.yml | 4 ++-- docs/source/developers/release_verification.rst | 2 +- 19 files changed, 28 insertions(+), 26 deletions(-) diff --git a/.env b/.env index f379ca14cd205..d9f875a4d454e 100644 --- a/.env +++ b/.env @@ -56,7 +56,7 @@ UBUNTU=20.04 CLANG_TOOLS=14 CUDA=11.2.2 DASK=latest -DOTNET=7.0 +DOTNET=8.0 GCC_VERSION="" GO=1.21.8 STATICCHECK=v0.4.7 diff --git a/.github/workflows/csharp.yml b/.github/workflows/csharp.yml index 17ef2de81088f..12f946fe66fc9 100644 --- a/.github/workflows/csharp.yml +++ b/.github/workflows/csharp.yml @@ -46,7 +46,7 @@ jobs: strategy: fail-fast: false matrix: - dotnet: ['7.0.x'] + dotnet: ['8.0.x'] steps: - name: Install C# uses: actions/setup-dotnet@v4 @@ -74,7 +74,7 @@ jobs: strategy: fail-fast: false matrix: - dotnet: ['7.0.x'] + dotnet: ['8.0.x'] steps: - name: Install C# uses: actions/setup-dotnet@v4 @@ -101,7 +101,7 @@ jobs: strategy: fail-fast: false matrix: - dotnet: ['7.0.x'] + dotnet: ['8.0.x'] steps: - name: Install C# uses: actions/setup-dotnet@v4 diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index 7c438be6024d6..6111d1d2e5fe3 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -115,7 +115,7 @@ jobs: - name: Install .NET uses: actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3 # v4.0.0 with: - dotnet-version: '7.0.x' + dotnet-version: '8.0.x' - name: Install Dependencies shell: bash run: | diff --git a/ci/docker/conda-integration.dockerfile b/ci/docker/conda-integration.dockerfile index a747ccbc7262f..30b9cd5199fab 100644 --- a/ci/docker/conda-integration.dockerfile +++ b/ci/docker/conda-integration.dockerfile @@ -56,7 +56,7 @@ RUN wget -nv -O - https://dl.google.com/go/go${go}.linux-${arch}.tar.gz | tar -x ENV DOTNET_ROOT=/opt/dotnet \ PATH=/opt/dotnet:$PATH -RUN curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin -Channel 7.0 -InstallDir /opt/dotnet +RUN curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin -Channel 8.0 -InstallDir /opt/dotnet ENV ARROW_ACERO=OFF \ ARROW_AZURE=OFF \ diff --git a/ci/docker/ubuntu-22.04-csharp.dockerfile b/ci/docker/ubuntu-22.04-csharp.dockerfile index aebbd8fab74e9..4d77ba060b877 100644 --- a/ci/docker/ubuntu-22.04-csharp.dockerfile +++ b/ci/docker/ubuntu-22.04-csharp.dockerfile @@ -16,7 +16,7 @@ # under the License. ARG arch=amd64 -ARG dotnet=7.0 +ARG dotnet=8.0 ARG platform=jammy FROM mcr.microsoft.com/dotnet/sdk:${dotnet}-${platform}-${arch} diff --git a/csharp/examples/FlightAspServerExample/FlightAspServerExample.csproj b/csharp/examples/FlightAspServerExample/FlightAspServerExample.csproj index 98e8bb324c727..79312520ba8c0 100644 --- a/csharp/examples/FlightAspServerExample/FlightAspServerExample.csproj +++ b/csharp/examples/FlightAspServerExample/FlightAspServerExample.csproj @@ -20,7 +20,7 @@ - net7.0 + net8.0 enable enable 10 diff --git a/csharp/examples/FlightClientExample/FlightClientExample.csproj b/csharp/examples/FlightClientExample/FlightClientExample.csproj index 228c5cf4ea44c..ce0ec83359769 100644 --- a/csharp/examples/FlightClientExample/FlightClientExample.csproj +++ b/csharp/examples/FlightClientExample/FlightClientExample.csproj @@ -21,7 +21,7 @@ Exe - net7.0 + net8.0 diff --git a/csharp/examples/FluentBuilderExample/FluentBuilderExample.csproj b/csharp/examples/FluentBuilderExample/FluentBuilderExample.csproj index a7bd5392f007d..b1d76d4db00e0 100644 --- a/csharp/examples/FluentBuilderExample/FluentBuilderExample.csproj +++ b/csharp/examples/FluentBuilderExample/FluentBuilderExample.csproj @@ -2,7 +2,7 @@ Exe - net7.0 + net8.0 diff --git a/csharp/test/Apache.Arrow.Benchmarks/Apache.Arrow.Benchmarks.csproj b/csharp/test/Apache.Arrow.Benchmarks/Apache.Arrow.Benchmarks.csproj index d44b7488e3b17..f735f01b022d0 100644 --- a/csharp/test/Apache.Arrow.Benchmarks/Apache.Arrow.Benchmarks.csproj +++ b/csharp/test/Apache.Arrow.Benchmarks/Apache.Arrow.Benchmarks.csproj @@ -2,7 +2,7 @@ Exe - net7.0 + net8.0 diff --git a/csharp/test/Apache.Arrow.Compression.Tests/Apache.Arrow.Compression.Tests.csproj b/csharp/test/Apache.Arrow.Compression.Tests/Apache.Arrow.Compression.Tests.csproj index 5cc0d303e881e..b386ccf79c12c 100644 --- a/csharp/test/Apache.Arrow.Compression.Tests/Apache.Arrow.Compression.Tests.csproj +++ b/csharp/test/Apache.Arrow.Compression.Tests/Apache.Arrow.Compression.Tests.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 false diff --git a/csharp/test/Apache.Arrow.Flight.Sql.Tests/Apache.Arrow.Flight.Sql.Tests.csproj b/csharp/test/Apache.Arrow.Flight.Sql.Tests/Apache.Arrow.Flight.Sql.Tests.csproj index 5b7c10f35bed0..ae6f9f1e69667 100644 --- a/csharp/test/Apache.Arrow.Flight.Sql.Tests/Apache.Arrow.Flight.Sql.Tests.csproj +++ b/csharp/test/Apache.Arrow.Flight.Sql.Tests/Apache.Arrow.Flight.Sql.Tests.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 false diff --git a/csharp/test/Apache.Arrow.Flight.TestWeb/Apache.Arrow.Flight.TestWeb.csproj b/csharp/test/Apache.Arrow.Flight.TestWeb/Apache.Arrow.Flight.TestWeb.csproj index d7a2042a4581a..bd6425e7ed99b 100644 --- a/csharp/test/Apache.Arrow.Flight.TestWeb/Apache.Arrow.Flight.TestWeb.csproj +++ b/csharp/test/Apache.Arrow.Flight.TestWeb/Apache.Arrow.Flight.TestWeb.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 diff --git a/csharp/test/Apache.Arrow.Flight.Tests/Apache.Arrow.Flight.Tests.csproj b/csharp/test/Apache.Arrow.Flight.Tests/Apache.Arrow.Flight.Tests.csproj index 050d0f452cc4e..ed158ca8656d3 100644 --- a/csharp/test/Apache.Arrow.Flight.Tests/Apache.Arrow.Flight.Tests.csproj +++ b/csharp/test/Apache.Arrow.Flight.Tests/Apache.Arrow.Flight.Tests.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 false diff --git a/csharp/test/Apache.Arrow.IntegrationTest/Apache.Arrow.IntegrationTest.csproj b/csharp/test/Apache.Arrow.IntegrationTest/Apache.Arrow.IntegrationTest.csproj index e77f329bf2a15..7f226fd08818f 100644 --- a/csharp/test/Apache.Arrow.IntegrationTest/Apache.Arrow.IntegrationTest.csproj +++ b/csharp/test/Apache.Arrow.IntegrationTest/Apache.Arrow.IntegrationTest.csproj @@ -4,7 +4,7 @@ Exe true - net7.0 + net8.0 diff --git a/csharp/test/Apache.Arrow.Tests/Apache.Arrow.Tests.csproj b/csharp/test/Apache.Arrow.Tests/Apache.Arrow.Tests.csproj index 92f6e2d662f38..06fb44e0a0e88 100644 --- a/csharp/test/Apache.Arrow.Tests/Apache.Arrow.Tests.csproj +++ b/csharp/test/Apache.Arrow.Tests/Apache.Arrow.Tests.csproj @@ -4,13 +4,15 @@ true true + + true - net7.0;net472;net462 + net8.0;net472;net462 - net7.0 + net8.0 diff --git a/dev/archery/archery/integration/tester_csharp.py b/dev/archery/archery/integration/tester_csharp.py index 9aab5b0b28ef9..02ced0701deaf 100644 --- a/dev/archery/archery/integration/tester_csharp.py +++ b/dev/archery/archery/integration/tester_csharp.py @@ -28,7 +28,7 @@ _EXE_PATH = os.path.join(_ARTIFACTS_PATH, "Apache.Arrow.IntegrationTest", - "Debug/net7.0/Apache.Arrow.IntegrationTest", + "Debug/net8.0/Apache.Arrow.IntegrationTest", ) _clr_loaded = False @@ -44,10 +44,10 @@ def _load_clr(): import clr clr.AddReference( f"{_ARTIFACTS_PATH}/Apache.Arrow.IntegrationTest/" - f"Debug/net7.0/Apache.Arrow.IntegrationTest.dll") + f"Debug/net8.0/Apache.Arrow.IntegrationTest.dll") clr.AddReference( f"{_ARTIFACTS_PATH}/Apache.Arrow.Tests/" - f"Debug/net7.0/Apache.Arrow.Tests.dll") + f"Debug/net8.0/Apache.Arrow.Tests.dll") from Apache.Arrow.IntegrationTest import CDataInterface CDataInterface.Initialize() diff --git a/dev/release/verify-release-candidate.sh b/dev/release/verify-release-candidate.sh index 77ea01e3eec04..95be4800f7ffd 100755 --- a/dev/release/verify-release-candidate.sh +++ b/dev/release/verify-release-candidate.sh @@ -347,7 +347,7 @@ install_csharp() { show_info "Ensuring that C# is installed..." - if dotnet --version | grep 7\.0 > /dev/null 2>&1; then + if dotnet --version | grep 8\.0 > /dev/null 2>&1; then local csharp_bin=$(dirname $(which dotnet)) show_info "Found C# at $(which csharp) (.NET $(dotnet --version))" else @@ -355,7 +355,7 @@ install_csharp() { show_info "dotnet found but it is the wrong version and will be ignored." fi local csharp_bin=${ARROW_TMPDIR}/csharp/bin - local dotnet_version=7.0.102 + local dotnet_version=8.0.204 local dotnet_platform= case "$(uname)" in Linux) diff --git a/dev/tasks/verify-rc/github.macos.yml b/dev/tasks/verify-rc/github.macos.yml index 8963954dba49d..4bc3fff71b64a 100644 --- a/dev/tasks/verify-rc/github.macos.yml +++ b/dev/tasks/verify-rc/github.macos.yml @@ -51,9 +51,9 @@ jobs: distribution: 'temurin' java-version: '11' - - uses: actions/setup-dotnet@v2 + - uses: actions/setup-dotnet@v4 with: - dotnet-version: '7.0.x' + dotnet-version: '8.0.x' - uses: actions/setup-node@v4 with: diff --git a/docs/source/developers/release_verification.rst b/docs/source/developers/release_verification.rst index ec474a5729b64..8c301b44a3c42 100644 --- a/docs/source/developers/release_verification.rst +++ b/docs/source/developers/release_verification.rst @@ -152,7 +152,7 @@ As an example: * NVIDIA CUDA Build cuda_11.5.r11.5/compiler.30672275_0 * openjdk version "17.0.9" 2023-10-17 * ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [x86_64-linux-gnu] - * dotnet 7.0.115 + * dotnet 8.0.204 * Ubuntu 22.04 LTS If there were some issues during verification please report them on the