Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Another attempt to fix stress tests #83211

Merged
merged 6 commits into from
Mar 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
}
Comment on lines +20 to +23
Copy link
Member Author

@antonfirsov antonfirsov Mar 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is now an asymmetry between run-docker-compose.ps1 in SslStress vs HttpStress.
For some reason, the HttpStress pipeline is ok to docker-compose build with V1 of compose but then do the run with V2, however in SslStress this resulted in a failure.
I don't want to add an equivalent workaround to run-docker-compose.ps1 in HttpStress, when it's not necessary.


# 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
}