Skip to content

Commit

Permalink
Fix stress test failures on 1es-windows-2022-open (#83211)
Browse files Browse the repository at this point in the history
  • Loading branch information
antonfirsov authored Mar 14, 2023
1 parent 6cde942 commit d6b89c6
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 7 deletions.
12 changes: 9 additions & 3 deletions eng/pipelines/libraries/stress/http.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,12 @@ extends:
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
Expand Down Expand Up @@ -138,7 +144,7 @@ extends:
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"
docker-compose up --abort-on-container-exit --no-color
& $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'))
Expand All @@ -150,7 +156,7 @@ extends:
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"
docker-compose up --abort-on-container-exit --no-color
& $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'))
Expand All @@ -162,7 +168,7 @@ extends:
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"
docker-compose up --abort-on-container-exit --no-color
& $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'))
Expand Down
9 changes: 7 additions & 2 deletions eng/pipelines/libraries/stress/ssl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,12 @@ extends:
pool:
name: $(DncEngPublicBuildPool)
demands: ImageOverride -equals 1es-windows-2022-open

variables:
# 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"
steps:
- checkout: self
clean: true
Expand All @@ -79,5 +84,5 @@ extends:
- powershell: |
cd '$(sslStressProject)'
docker-compose up --abort-on-container-exit --no-color
& $env:DOCKER_COMPOSE_CMD up --abort-on-container-exit --no-color
displayName: Run SslStress
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ Param(
$REPO_ROOT_DIR = $(git -C "$PSScriptRoot" rev-parse --show-toplevel)
$COMPOSE_FILE = "$PSScriptRoot/docker-compose.yml"

# This is a workaround for an issue with 1es-windows-2022-open, which should be eventually removed.
# See comments in <repo>/eng/pipelines/libraries/stress/ssl.yml for more info.
$dockerComposeCmd = $env:DOCKER_COMPOSE_CMD
if (!(Test-Path $dockerComposeCmd)) {
$dockerComposeCmd = "docker-compose"
}

# Build runtime libraries and place in a docker image

if ($buildCurrentLibraries)
Expand Down Expand Up @@ -50,7 +57,7 @@ if ($useWindowsContainers)
$originalErrorPreference = $ErrorActionPreference
$ErrorActionPreference = 'Continue'
try {
docker-compose --log-level DEBUG --file "$COMPOSE_FILE" build $BUILD_ARGS.Split() 2>&1 | ForEach-Object { "$_" }
& $dockerComposeCmd --log-level DEBUG --file "$COMPOSE_FILE" build $BUILD_ARGS.Split() 2>&1 | ForEach-Object { "$_" }
if ($LASTEXITCODE -ne 0) {
throw "docker-compose exited with error code $LASTEXITCODE"
}
Expand All @@ -65,5 +72,5 @@ if (!$buildOnly)
{
$env:SSLSTRESS_CLIENT_ARGS = $clientStressArgs
$env:SSLSTRESS_SERVER_ARGS = $serverStressArgs
docker-compose --file "$COMPOSE_FILE" up --abort-on-container-exit
& $dockerComposeCmd --file "$COMPOSE_FILE" up --abort-on-container-exit
}

0 comments on commit d6b89c6

Please sign in to comment.