From 629b5c682c45bde5cc973db7e7589e1d5a2404fa Mon Sep 17 00:00:00 2001 From: Andrew Lock Date: Wed, 13 Nov 2024 11:29:26 +0000 Subject: [PATCH 1/6] Fix gitlab build --- .gitlab-ci.yml | 2 +- .../build/_build/docker/gitlab/gitlab.windows.dockerfile | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0acc820be842..936783cb8a99 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -26,7 +26,7 @@ build: script: - if (Test-Path build-out) { remove-item -recurse -force build-out } - if (Test-Path artifacts-out) { remove-item -recurse -force artifacts-out } - - docker run --rm -m 8192M -v "$(Get-Location):c:\mnt" -e CI_JOB_ID=${CI_JOB_ID} -e ENABLE_MULTIPROCESSOR_COMPILATION=false -e WINDOWS_BUILDER=true -e AWS_NETWORKING=true -e SIGN_WINDOWS=true -e NUGET_CERT_REVOCATION_MODE=offline datadog/dd-trace-dotnet-docker-build:dotnet9 + - docker run --rm -m 8192M -v "$(Get-Location):c:\mnt" -e CI_JOB_ID=${CI_JOB_ID} -e ENABLE_MULTIPROCESSOR_COMPILATION=false -e WINDOWS_BUILDER=true -e AWS_NETWORKING=true -e SIGN_WINDOWS=true -e NUGET_CERT_REVOCATION_MODE=offline registry.ddbuild.io/images/mirror/datadog/dd-trace-dotnet-docker-build:latest - mkdir artifacts-out - xcopy /e/s build-out\${CI_JOB_ID}\*.* artifacts-out - remove-item -recurse -force build-out\${CI_JOB_ID} diff --git a/tracer/build/_build/docker/gitlab/gitlab.windows.dockerfile b/tracer/build/_build/docker/gitlab/gitlab.windows.dockerfile index c9f9a1e50b8d..5531904c073f 100644 --- a/tracer/build/_build/docker/gitlab/gitlab.windows.dockerfile +++ b/tracer/build/_build/docker/gitlab/gitlab.windows.dockerfile @@ -1,6 +1,6 @@ # To build this file locally, starting from the root directory: # cd tracer/build/_build/docker/gitlab -# docker build -f gitlab.windows.dockerfile --tag datadog/dd-trace-dotnet-docker-build:dotnet9 . +# docker build -f gitlab.windows.dockerfile --tag datadog/dd-trace-dotnet-docker-build:latest . # docker push datadog/dd-trace-dotnet-docker-build:latest ARG BASE_IMAGE=mcr.microsoft.com/dotnet/framework/runtime:4.8-windowsservercore-ltsc2019 @@ -30,9 +30,9 @@ RUN powershell -Command .\install_wix.ps1 -Version $ENV:WIX_VERSION -Sha256 $ENV # Install .NET 9 # To find these links, visit https://dotnet.microsoft.com/en-us/download, click the Windows, x64 installer, and grab the download url + SHA512 hash -ENV DOTNET_VERSION="9.0.100-rc.2.24474.11" \ - DOTNET_DOWNLOAD_URL="https://download.visualstudio.microsoft.com/download/pr/084bfbb9-6197-49d9-ae9c-ad3825534f37/e1a071d344c9b24849f8034f7ce72aa6/dotnet-sdk-9.0.100-rc.2.24474.11-win-x64.exe" \ - DOTNET_SHA512="29091a2b4d08f7fdc77065f2805a82afae0129a6b886caec71124016843a29c6abcec828794aef1c9a73a84df3f7b7258863991f61a780ea362575da0ca6879b" +ENV DOTNET_VERSION="9.0.100" \ + DOTNET_DOWNLOAD_URL="https://download.visualstudio.microsoft.com/download/pr/10bb041d-e705-473e-9654-27c0e038f5bd/447c0c10654c2949872fa6154b8c27b5/dotnet-sdk-9.0.100-win-x64.exe" \ + DOTNET_SHA512="a12ee028f7dff8f330dbe1914534d237eb6e19cc105139ce5de69df1b4b07ee3c1a3e396574ca776a452e805052e799df14a348ace50191af514c9dc4705ecf0" COPY install_dotnet.ps1 . RUN powershell -Command .\install_dotnet.ps1 -Version $ENV:DOTNET_VERSION -Sha512 $ENV:DOTNET_SHA512 $ENV:DOTNET_DOWNLOAD_URL From 78465346cab8be1ead3954791dc3704033fd3e5f Mon Sep 17 00:00:00 2001 From: Andrew Lock Date: Wed, 13 Nov 2024 11:44:08 +0000 Subject: [PATCH 2/6] Reenable ManualInstrumentationTests for x86 --- .../ManualInstrumentationTests.cs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/ManualInstrumentationTests.cs b/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/ManualInstrumentationTests.cs index 5ef3b93ca382..bfafc499d40f 100644 --- a/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/ManualInstrumentationTests.cs +++ b/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/ManualInstrumentationTests.cs @@ -54,12 +54,6 @@ public async Task NGenRunManualAndAutomatic() [Trait("RunOnWindows", "True")] public async Task ReadyToRunManualAndAutomatic() { - // FIXME: .NET 9 RC2 doesn't seem to behave well with ReadyToRun in our CI - // I'm 99.9% sure it's an issue in our build but it's more hassle than it's worth to fix right now - // I'm hoping that we can just remove this skip for the GA of .NET 9 -#if NET9_0 - SkipOn.PlatformAndArchitecture(SkipOn.PlatformValue.Windows, SkipOn.ArchitectureValue.X86); -#endif #if !NET6_0_OR_GREATER // osx-arm64 doesn't work with Ready2Run SkipOn.PlatformAndArchitecture(SkipOn.PlatformValue.MacOs, SkipOn.ArchitectureValue.ARM64); From bbb43c01c6dccf6f2e13087f91bafa81f13d34c8 Mon Sep 17 00:00:00 2001 From: Andrew Lock Date: Wed, 13 Nov 2024 13:32:30 +0000 Subject: [PATCH 3/6] Try running trimmer test --- .../AppTrimmingTests.cs | 7 ------- 1 file changed, 7 deletions(-) diff --git a/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/AppTrimmingTests.cs b/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/AppTrimmingTests.cs index 300d378f9240..e31ca7814693 100644 --- a/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/AppTrimmingTests.cs +++ b/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/AppTrimmingTests.cs @@ -25,13 +25,6 @@ public AppTrimmingTests(ITestOutputHelper output) [SkippableFact] public async Task TrimmerTest() { - // FIXME: .NET 9 RC2 fails weirdly only on this combination - // I have a theory it's tied to the fact we're using MVC in our trimming app - // which I don't believe is officially supported for trimming, so we should - // probably migrate that, but going to do that separately. -#if NET9_0 - SkipOn.PlatformAndArchitecture(SkipOn.PlatformValue.Linux, SkipOn.ArchitectureValue.ARM64); -#endif var httpPort = TcpPortProvider.GetOpenPort(); Output.WriteLine($"Assigning port {httpPort} for the httpPort."); From ba4b1b0429df7133c01937f1807f218a14e126aa Mon Sep 17 00:00:00 2001 From: Andrew Lock Date: Wed, 13 Nov 2024 15:19:00 +0000 Subject: [PATCH 4/6] Try fix manual instrumentation tests --- tracer/build/_build/Build.Steps.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/tracer/build/_build/Build.Steps.cs b/tracer/build/_build/Build.Steps.cs index 74d0d314a84e..7ada41fca468 100644 --- a/tracer/build/_build/Build.Steps.cs +++ b/tracer/build/_build/Build.Steps.cs @@ -1499,6 +1499,7 @@ _ when exclude.Contains(x.project.Path) => false, }; DotNetPublish(config => config + .SetDotnetPath(TargetPlatform) .SetConfiguration(BuildConfiguration) .SetFramework(Framework) .SetRuntime(rid) From 6ab149d463cee50d2979b64017f5b03752984c01 Mon Sep 17 00:00:00 2001 From: Andrew Lock Date: Wed, 13 Nov 2024 16:48:07 +0000 Subject: [PATCH 5/6] Revert "Try fix manual instrumentation tests" This reverts commit 2dfe637b5d736263b96a33f398cea074d44648a9. --- tracer/build/_build/Build.Steps.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/tracer/build/_build/Build.Steps.cs b/tracer/build/_build/Build.Steps.cs index 7ada41fca468..74d0d314a84e 100644 --- a/tracer/build/_build/Build.Steps.cs +++ b/tracer/build/_build/Build.Steps.cs @@ -1499,7 +1499,6 @@ _ when exclude.Contains(x.project.Path) => false, }; DotNetPublish(config => config - .SetDotnetPath(TargetPlatform) .SetConfiguration(BuildConfiguration) .SetFramework(Framework) .SetRuntime(rid) From e1ed02b6486a43b6e4dc5b43c0709e73717cb90b Mon Sep 17 00:00:00 2001 From: Andrew Lock Date: Wed, 13 Nov 2024 16:48:22 +0000 Subject: [PATCH 6/6] Revert "Reenable ManualInstrumentationTests for x86" This reverts commit 170ed6ba0f328e8623e38b1d8aadbd47296bc298. --- .../ManualInstrumentationTests.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/ManualInstrumentationTests.cs b/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/ManualInstrumentationTests.cs index bfafc499d40f..5ef3b93ca382 100644 --- a/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/ManualInstrumentationTests.cs +++ b/tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/ManualInstrumentationTests.cs @@ -54,6 +54,12 @@ public async Task NGenRunManualAndAutomatic() [Trait("RunOnWindows", "True")] public async Task ReadyToRunManualAndAutomatic() { + // FIXME: .NET 9 RC2 doesn't seem to behave well with ReadyToRun in our CI + // I'm 99.9% sure it's an issue in our build but it's more hassle than it's worth to fix right now + // I'm hoping that we can just remove this skip for the GA of .NET 9 +#if NET9_0 + SkipOn.PlatformAndArchitecture(SkipOn.PlatformValue.Windows, SkipOn.ArchitectureValue.X86); +#endif #if !NET6_0_OR_GREATER // osx-arm64 doesn't work with Ready2Run SkipOn.PlatformAndArchitecture(SkipOn.PlatformValue.MacOs, SkipOn.ArchitectureValue.ARM64);