From 1ab0cd435ade84bec8ad3867865c0160b7979d5f Mon Sep 17 00:00:00 2001 From: antonfirsov Date: Wed, 20 Mar 2024 21:22:40 +0100 Subject: [PATCH 1/6] repro plz --- eng/pipelines/libraries/stress/http.yml | 164 ++---------------------- 1 file changed, 10 insertions(+), 154 deletions(-) diff --git a/eng/pipelines/libraries/stress/http.yml b/eng/pipelines/libraries/stress/http.yml index f4f9c45de36e4..e2bae50a2c497 100644 --- a/eng/pipelines/libraries/stress/http.yml +++ b/eng/pipelines/libraries/stress/http.yml @@ -5,25 +5,14 @@ pr: include: - "*" -schedules: -- cron: "0 13 * * *" # 1PM UTC => 5 AM PST - displayName: HttpStress nightly run - branches: - include: - - main - - release/6.0 - - release/7.0 - - release/8.0 - variables: - - template: ../variables.yml - - name: dockerfilesFolder - value: $(Build.SourcesDirectory)/eng/docker - - name: httpStressProject - value: $(sourcesRoot)/System.Net.Http/tests/StressTests/HttpStress - - name: sdkBaseImage - value: dotnet-sdk-libraries-current - + # - template: ../variables.yml + # - name: dockerfilesFolder + # value: $(Build.SourcesDirectory)/eng/docker + # - name: httpStressProject + # value: $(sourcesRoot)/System.Net.Http/tests/StressTests/HttpStress + # - name: sdkBaseImage + # value: dotnet-sdk-libraries-current extends: template: /eng/pipelines/common/templates/pipeline-with-resources.yml @@ -31,83 +20,9 @@ extends: stages: - stage: Build jobs: - - job: linux - displayName: Docker Linux - timeoutInMinutes: 240 - variables: - DUMPS_SHARE_MOUNT_ROOT: "/dumps-share" - pool: - name: $(DncEngPublicBuildPool) - demands: ImageOverride -equals 1es-ubuntu-1804-open - - steps: - - checkout: self - clean: true - fetchDepth: 5 - - - bash: | - $(dockerfilesFolder)/build-docker-sdk.sh -t $(sdkBaseImage) -c $(BUILD_CONFIGURATION) && \ - echo "##vso[task.setvariable variable=succeeded;isOutput=true]true" - name: buildRuntime - displayName: Build CLR and Libraries - - - bash: | - $(httpStressProject)/run-docker-compose.sh -o -c $(BUILD_CONFIGURATION) -t $(sdkBaseImage) && \ - echo "##vso[task.setvariable variable=succeeded;isOutput=true]true" - name: buildStress - displayName: Build HttpStress - - - bash: | - cd '$(httpStressProject)' - export CLIENT_DUMPS_SHARE="$(Build.ArtifactStagingDirectory)/dumps/client/3.0" - export SERVER_DUMPS_SHARE="$(Build.ArtifactStagingDirectory)/dumps/server/3.0" - export HTTPSTRESS_CLIENT_ARGS="$HTTPSTRESS_CLIENT_ARGS -http 3.0" - export HTTPSTRESS_SERVER_ARGS="$HTTPSTRESS_SERVER_ARGS -http 3.0" - docker-compose up --abort-on-container-exit --no-color - timeoutInMinutes: 35 # In case the HTTP/3.0 run hangs, we timeout shortly after the expected 30 minute run - displayName: Run HttpStress - HTTP 3.0 - condition: and(eq(variables['buildRuntime.succeeded'], 'true'), eq(variables['buildStress.succeeded'], 'true')) - - - bash: | - cd '$(httpStressProject)' - export CLIENT_DUMPS_SHARE="$(Build.ArtifactStagingDirectory)/dumps/client/2.0" - export SERVER_DUMPS_SHARE="$(Build.ArtifactStagingDirectory)/dumps/server/2.0" - export HTTPSTRESS_CLIENT_ARGS="$HTTPSTRESS_CLIENT_ARGS -http 2.0" - export HTTPSTRESS_SERVER_ARGS="$HTTPSTRESS_SERVER_ARGS -http 2.0" - docker-compose up --abort-on-container-exit --no-color - displayName: Run HttpStress - HTTP 2.0 - condition: and(eq(variables['buildRuntime.succeeded'], 'true'), eq(variables['buildStress.succeeded'], 'true')) - - - bash: | - cd '$(httpStressProject)' - export CLIENT_DUMPS_SHARE="$(Build.ArtifactStagingDirectory)/dumps/client/1.1" - export SERVER_DUMPS_SHARE="$(Build.ArtifactStagingDirectory)/dumps/server/1.1" - export HTTPSTRESS_CLIENT_ARGS="$HTTPSTRESS_CLIENT_ARGS -http 1.1" - export HTTPSTRESS_SERVER_ARGS="$HTTPSTRESS_SERVER_ARGS -http 1.1" - docker-compose up --abort-on-container-exit --no-color - displayName: Run HttpStress - HTTP 1.1 - condition: and(eq(variables['buildRuntime.succeeded'], 'true'), eq(variables['buildStress.succeeded'], 'true')) - - - bash: | - sudo chown -R $(id -u):$(id -g) $(Build.ArtifactStagingDirectory)/dumps - displayName: Own shared dumps and files - condition: failed() - - - publish: $(Build.ArtifactStagingDirectory)/dumps - artifact: DumpsLinux - condition: failed() - - job: windows - displayName: Docker NanoServer + displayName: Test timeoutInMinutes: 150 - variables: - DUMPS_SHARE_MOUNT_ROOT: "C:/dumps-share" - - # The 1es-windows-2022-open image has an issue where the Chocolatey-installed V1 docker-compose takes precendence over the - # V2 docker-compose required by the stress tests, see: https://github.com/actions/runner-images/issues/7080 - # This is worked around by handpicking the V2 executable. - # The workaround should be removed when the official fix is propagated into 1es-windows-2022-open, or when we switch to another image. - DOCKER_COMPOSE_CMD: "C:/ProgramData/docker/cli-plugins/docker-compose.exe" pool: name: $(DncEngPublicBuildPool) demands: ImageOverride -equals 1es-windows-2022-open @@ -119,65 +34,6 @@ extends: lfs: false - powershell: | - $(dockerfilesFolder)/build-docker-sdk.ps1 -w -t $(sdkBaseImage) -c $(BUILD_CONFIGURATION) - echo "##vso[task.setvariable variable=succeeded;isOutput=true]true" + & "$(Build.SourcesDirectory)/build.cmd" clr+libs -ci -rc Release -c Release name: buildRuntime - displayName: Build CLR and Libraries - - - powershell: | - $(httpStressProject)/run-docker-compose.ps1 -w -o -c $(BUILD_CONFIGURATION) -t $(sdkBaseImage) - echo "##vso[task.setvariable variable=succeeded;isOutput=true]true" - name: buildStress - displayName: Build HttpStress - - # Firewall is disabled for the test runs, since it can lead to unexpected TCP failures on CI machines, which are unrelated to the HTTP logic. - # See: https://github.com/dotnet/runtime/issues/50854 - - powershell: | - Set-NetFirewallProfile -Profile Domain, Public, Private -Enabled False - name: disableFirewall - displayName: Disable Firewall - - - powershell: | - cd '$(httpStressProject)' - $env:CLIENT_DUMPS_SHARE="$(Build.ArtifactStagingDirectory)/dumps/client/3.0" - $env:SERVER_DUMPS_SHARE="$(Build.ArtifactStagingDirectory)/dumps/server/3.0" - New-Item -Force $env:CLIENT_DUMPS_SHARE -ItemType Directory - New-Item -Force $env:SERVER_DUMPS_SHARE -ItemType Directory - $env:HTTPSTRESS_CLIENT_ARGS = "$env:HTTPSTRESS_CLIENT_ARGS -http 3.0" - $env:HTTPSTRESS_SERVER_ARGS = "$env:HTTPSTRESS_SERVER_ARGS -http 3.0" - & $env:DOCKER_COMPOSE_CMD up --abort-on-container-exit --no-color - displayName: Run HttpStress - HTTP 3.0 - condition: and(eq(variables['buildRuntime.succeeded'], 'true'), eq(variables['buildStress.succeeded'], 'true')) - - - powershell: | - cd '$(httpStressProject)' - $env:CLIENT_DUMPS_SHARE="$(Build.ArtifactStagingDirectory)/dumps/client/2.0" - $env:SERVER_DUMPS_SHARE="$(Build.ArtifactStagingDirectory)/dumps/server/2.0" - New-Item -Force $env:CLIENT_DUMPS_SHARE -ItemType Directory - New-Item -Force $env:SERVER_DUMPS_SHARE -ItemType Directory - $env:HTTPSTRESS_CLIENT_ARGS = "$env:HTTPSTRESS_CLIENT_ARGS -http 2.0" - $env:HTTPSTRESS_SERVER_ARGS = "$env:HTTPSTRESS_SERVER_ARGS -http 2.0" - & $env:DOCKER_COMPOSE_CMD up --abort-on-container-exit --no-color - displayName: Run HttpStress - HTTP 2.0 - condition: and(eq(variables['buildRuntime.succeeded'], 'true'), eq(variables['buildStress.succeeded'], 'true')) - - - powershell: | - cd '$(httpStressProject)' - $env:CLIENT_DUMPS_SHARE="$(Build.ArtifactStagingDirectory)/dumps/client/1.1" - $env:SERVER_DUMPS_SHARE="$(Build.ArtifactStagingDirectory)/dumps/server/1.1" - New-Item -Force $env:CLIENT_DUMPS_SHARE -ItemType Directory - New-Item -Force $env:SERVER_DUMPS_SHARE -ItemType Directory - $env:HTTPSTRESS_CLIENT_ARGS = "$env:HTTPSTRESS_CLIENT_ARGS -http 1.1" - $env:HTTPSTRESS_SERVER_ARGS = "$env:HTTPSTRESS_SERVER_ARGS -http 1.1" - & $env:DOCKER_COMPOSE_CMD up --abort-on-container-exit --no-color - displayName: Run HttpStress - HTTP 1.1 - condition: and(eq(variables['buildRuntime.succeeded'], 'true'), eq(variables['buildStress.succeeded'], 'true')) - - - publish: $(Build.ArtifactStagingDirectory)/dumps - artifact: DumpsWindows - condition: failed() - - - powershell: | - Set-NetFirewallProfile -Profile Domain, Public, Private -Enabled True - name: enableFirewall - displayName: Enable Firewall + displayName: Build CLR and Libraries \ No newline at end of file From ece4c9e7f1674eb078627bfe75d8dd7eb99a97c9 Mon Sep 17 00:00:00 2001 From: antonfirsov Date: Wed, 20 Mar 2024 21:28:35 +0100 Subject: [PATCH 2/6] . --- eng/pipelines/libraries/stress/http.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/libraries/stress/http.yml b/eng/pipelines/libraries/stress/http.yml index e2bae50a2c497..481bf999a03ae 100644 --- a/eng/pipelines/libraries/stress/http.yml +++ b/eng/pipelines/libraries/stress/http.yml @@ -5,7 +5,7 @@ pr: include: - "*" -variables: +#variables: # - template: ../variables.yml # - name: dockerfilesFolder # value: $(Build.SourcesDirectory)/eng/docker From b9a152062704c22ea69adb5e8e0d58bfcae3b9cc Mon Sep 17 00:00:00 2001 From: antonfirsov Date: Wed, 20 Mar 2024 21:34:00 +0100 Subject: [PATCH 3/6] need some variables --- eng/pipelines/libraries/stress/http.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/pipelines/libraries/stress/http.yml b/eng/pipelines/libraries/stress/http.yml index 481bf999a03ae..cb91bbee72def 100644 --- a/eng/pipelines/libraries/stress/http.yml +++ b/eng/pipelines/libraries/stress/http.yml @@ -5,8 +5,8 @@ pr: include: - "*" -#variables: - # - template: ../variables.yml +variables: + - template: ../variables.yml # - name: dockerfilesFolder # value: $(Build.SourcesDirectory)/eng/docker # - name: httpStressProject From 26c241fb122eede0f5309f003c28f94b3a7b030d Mon Sep 17 00:00:00 2001 From: antonfirsov Date: Fri, 22 Mar 2024 01:02:35 +0100 Subject: [PATCH 4/6] check vcvars output --- eng/pipelines/libraries/stress/http.yml | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/eng/pipelines/libraries/stress/http.yml b/eng/pipelines/libraries/stress/http.yml index cb91bbee72def..1041067f9ae1b 100644 --- a/eng/pipelines/libraries/stress/http.yml +++ b/eng/pipelines/libraries/stress/http.yml @@ -7,12 +7,6 @@ pr: variables: - template: ../variables.yml - # - name: dockerfilesFolder - # value: $(Build.SourcesDirectory)/eng/docker - # - name: httpStressProject - # value: $(sourcesRoot)/System.Net.Http/tests/StressTests/HttpStress - # - name: sdkBaseImage - # value: dotnet-sdk-libraries-current extends: template: /eng/pipelines/common/templates/pipeline-with-resources.yml @@ -28,12 +22,8 @@ extends: demands: ImageOverride -equals 1es-windows-2022-open steps: - - checkout: self - clean: true - fetchDepth: 5 - lfs: false - - - powershell: | - & "$(Build.SourcesDirectory)/build.cmd" clr+libs -ci -rc Release -c Release - name: buildRuntime - displayName: Build CLR and Libraries \ No newline at end of file + - script: | + set VSCMD_DEBUG=2 + "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" amd64 + name: slay + displayName: SLAY! \ No newline at end of file From 2de492c9ffe62c814f2b194b5af94dc3c6463625 Mon Sep 17 00:00:00 2001 From: antonfirsov Date: Fri, 22 Mar 2024 01:52:36 +0100 Subject: [PATCH 5/6] print defaults --- eng/pipelines/libraries/stress/http.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/eng/pipelines/libraries/stress/http.yml b/eng/pipelines/libraries/stress/http.yml index 1041067f9ae1b..6f0c1d58a02f6 100644 --- a/eng/pipelines/libraries/stress/http.yml +++ b/eng/pipelines/libraries/stress/http.yml @@ -23,7 +23,11 @@ extends: steps: - script: | + type "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\Microsoft.VCToolsVersion.v143.default.txt" + type "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\Microsoft.VCToolsVersion.default.txt" + echo ------ set VSCMD_DEBUG=2 + set VCToolsInstallDir="C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.38.33130" "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" amd64 name: slay displayName: SLAY! \ No newline at end of file From 8f325e867cfc5249ca19b52a542e91d9dec52cc7 Mon Sep 17 00:00:00 2001 From: antonfirsov Date: Fri, 22 Mar 2024 13:36:44 +0100 Subject: [PATCH 6/6] delete Microsoft.VCToolsVersion.v143.default.txt --- eng/pipelines/libraries/stress/http.yml | 2 +- eng/pipelines/libraries/stress/ssl.yml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/eng/pipelines/libraries/stress/http.yml b/eng/pipelines/libraries/stress/http.yml index 6f0c1d58a02f6..499483d95b446 100644 --- a/eng/pipelines/libraries/stress/http.yml +++ b/eng/pipelines/libraries/stress/http.yml @@ -23,7 +23,7 @@ extends: steps: - script: | - type "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\Microsoft.VCToolsVersion.v143.default.txt" + del "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\Microsoft.VCToolsVersion.v143.default.txt" type "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\Microsoft.VCToolsVersion.default.txt" echo ------ set VSCMD_DEBUG=2 diff --git a/eng/pipelines/libraries/stress/ssl.yml b/eng/pipelines/libraries/stress/ssl.yml index 1052d3b04285c..fdafd76420517 100644 --- a/eng/pipelines/libraries/stress/ssl.yml +++ b/eng/pipelines/libraries/stress/ssl.yml @@ -76,6 +76,7 @@ extends: lfs: false - powershell: | + Remove-Item -Path "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\Microsoft.VCToolsVersion.v143.default.txt" $(dockerfilesFolder)/build-docker-sdk.ps1 -w -t $(sdkBaseImage) -c $(BUILD_CONFIGURATION) displayName: Build CLR and Libraries