Skip to content

[NET] Fix docker compose.#126473

Open
ManickaP wants to merge 1 commit intodotnet:release/10.0from
ManickaP:fix-stress
Open

[NET] Fix docker compose.#126473
ManickaP wants to merge 1 commit intodotnet:release/10.0from
ManickaP:fix-stress

Conversation

@ManickaP
Copy link
Copy Markdown
Member

@ManickaP ManickaP commented Apr 2, 2026

Fixes broken stress by recent changes in used images.
Test infra only change, no product code affected.

Copilot AI review requested due to automatic review settings April 2, 2026 14:59
@ManickaP
Copy link
Copy Markdown
Member Author

ManickaP commented Apr 2, 2026

/azp run runtime-libraries stress-http

@ManickaP
Copy link
Copy Markdown
Member Author

ManickaP commented Apr 2, 2026

/azp run runtime-libraries stress-ssl

@dotnet-policy-service
Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @karelz, @dotnet/ncl
See info in area-owners.md if you want to be subscribed.

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

1 similar comment
@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates System.Net stress-test Docker Compose runner scripts to address infra changes affecting compose invocation.

Changes:

  • Switch the bash runner to use docker compose (Compose v2 plugin) for build and up.
  • Update the PowerShell runner to use docker-compose (Compose v1) for build and up (including log/error text).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
src/libraries/Common/tests/System/Net/StressTests/run-docker-compose.sh Uses docker compose for compose build/run.
src/libraries/Common/tests/System/Net/StressTests/run-docker-compose.ps1 Uses docker-compose for compose build/run and updates related messaging.

Comment on lines +103 to 105
if ! docker compose --file "$compose_file" build $build_args; then
exit $?
fi
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

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

In if ! ...; then exit $?; fi, $? inside the then block is the status of the negated ! pipeline (typically 0 when the docker compose command failed), so build failures can be reported as success. Consider removing the if ! wrapper and relying on set -e, or capture the command exit code before negation / use || exit $? to preserve the failing exit code.

Copilot uses AI. Check for mistakes.
Comment on lines +64 to 68
write-output "docker-compose --file $COMPOSE_FILE build $buildArgs"
docker-compose --file $COMPOSE_FILE build @buildArgs 2>&1
if ($LASTEXITCODE -ne 0) {
throw "docker compose exited with error code $LASTEXITCODE"
throw "docker-compose exited with error code $LASTEXITCODE"
}
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

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

This script now invokes docker-compose (v1) while the bash version and the stress pipelines use docker compose (v2 plugin). If the infra change motivating this PR is removal of the docker-compose binary, this will still fail on Windows. Suggest using docker compose consistently here (and update the log/throw text accordingly), or implement a small fallback that prefers docker compose but uses docker-compose if the plugin isn't available.

Copilot uses AI. Check for mistakes.
$env:STRESS_CLIENT_ARGS = $clientStressArgs
$env:STRESS_SERVER_ARGS = $serverStressArgs
docker compose --file "$COMPOSE_FILE" up --abort-on-container-exit
docker-compose --file "$COMPOSE_FILE" up --abort-on-container-exit
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

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

Same concern as the build step: docker-compose is used here, but CI stress pipelines already run docker compose ... on Windows (e.g., eng/pipelines/libraries/stress/ssl.yml). If docker-compose isn't installed on the updated images, this up invocation will fail. Align to docker compose (or add a fallback) so both scripts behave the same across platforms.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants