Skip to content

Commit cb07167

Browse files
authored
[NET] Add a new pipeline for PR trigger on top of the existing stress pipelines (#126474)
The PR trigger with file path filter for the pipelines must be separated into its own pipeline. Otherwise, `azp run ...` would stop working for them and we need that to manually run stress on HTTP / SSL product code changes. - `*-stages.yml` contain the original "meat" of the pipelines. - PR triggers from `http.yml` and `ssl.yml` are moved to new pipelines `*-pr.yml` This will also need help from engineering services to actually create and enable the new pipelines. This is a follow-up on #126358 that didn't work.
1 parent 24d70a4 commit cb07167

6 files changed

Lines changed: 274 additions & 240 deletions

File tree

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
trigger: none
2+
3+
pr:
4+
branches:
5+
include:
6+
- main
7+
- release/*.0
8+
paths:
9+
include:
10+
- src/libraries/System.Net.Http/tests/StressTests/HttpStress/**
11+
- src/libraries/Common/tests/System/Net/StressTests/**
12+
- eng/pipelines/libraries/stress/**
13+
14+
variables:
15+
- template: ../variables.yml
16+
- name: dockerfilesFolder
17+
value: $(Build.SourcesDirectory)/eng/docker
18+
- name: httpStressProject
19+
value: $(sourcesRoot)/System.Net.Http/tests/StressTests/HttpStress
20+
- name: sdkBaseImage
21+
value: dotnet-sdk-libraries-current
22+
23+
extends:
24+
template: /eng/pipelines/common/templates/pipeline-with-resources.yml
25+
parameters:
26+
stages:
27+
- template: /eng/pipelines/libraries/stress/http-stages.yml
Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
stages:
2+
- stage: Build
3+
jobs:
4+
- job: linux
5+
displayName: Docker Linux
6+
timeoutInMinutes: 240
7+
variables:
8+
DUMPS_SHARE_MOUNT_ROOT: "/dumps-share"
9+
DUMPS_SHARE: "$(Build.ArtifactStagingDirectory)/dumps/"
10+
pool:
11+
name: $(DncEngPublicBuildPool)
12+
demands: ImageOverride -equals build.azurelinux.3.amd64.open
13+
14+
steps:
15+
- checkout: self
16+
clean: true
17+
fetchDepth: 5
18+
fetchTags: false
19+
20+
- bash: |
21+
$(dockerfilesFolder)/build-docker-sdk.sh -t $(sdkBaseImage) -c $(BUILD_CONFIGURATION) && \
22+
echo "##vso[task.setvariable variable=succeeded;isOutput=true]true"
23+
name: buildRuntime
24+
displayName: Build CLR and Libraries
25+
26+
- bash: |
27+
$(httpStressProject)/run-docker-compose.sh -o -c $(BUILD_CONFIGURATION) -t $(sdkBaseImage) && \
28+
echo "##vso[task.setvariable variable=succeeded;isOutput=true]true"
29+
name: buildStress
30+
displayName: Build HttpStress
31+
32+
- bash: |
33+
cd '$(httpStressProject)'
34+
export STRESS_CLIENT_ARGS="$HTTPSTRESS_CLIENT_ARGS -http 3.0"
35+
export STRESS_SERVER_ARGS="$HTTPSTRESS_SERVER_ARGS -http 3.0"
36+
mkdir -p $DUMPS_SHARE
37+
docker compose up --abort-on-container-exit --no-color
38+
timeoutInMinutes: 35 # In case the HTTP/3.0 run hangs, we timeout shortly after the expected 30 minute run
39+
displayName: Run HttpStress - HTTP 3.0
40+
condition: and(eq(variables['buildRuntime.succeeded'], 'true'), eq(variables['buildStress.succeeded'], 'true'))
41+
42+
- bash: |
43+
cd '$(httpStressProject)'
44+
export STRESS_CLIENT_ARGS="$HTTPSTRESS_CLIENT_ARGS -http 2.0"
45+
export STRESS_SERVER_ARGS="$HTTPSTRESS_SERVER_ARGS -http 2.0"
46+
mkdir -p $DUMPS_SHARE
47+
docker compose down
48+
docker compose up --abort-on-container-exit --no-color
49+
displayName: Run HttpStress - HTTP 2.0
50+
condition: and(eq(variables['buildRuntime.succeeded'], 'true'), eq(variables['buildStress.succeeded'], 'true'))
51+
52+
- bash: |
53+
cd '$(httpStressProject)'
54+
export STRESS_CLIENT_ARGS="$HTTPSTRESS_CLIENT_ARGS -http 1.1"
55+
export STRESS_SERVER_ARGS="$HTTPSTRESS_SERVER_ARGS -http 1.1"
56+
mkdir -p $DUMPS_SHARE
57+
docker compose down
58+
docker compose up --abort-on-container-exit --no-color
59+
displayName: Run HttpStress - HTTP 1.1
60+
condition: and(eq(variables['buildRuntime.succeeded'], 'true'), eq(variables['buildStress.succeeded'], 'true'))
61+
62+
- bash: |
63+
sudo chown -R $(id -u):$(id -g) $(Build.ArtifactStagingDirectory)/dumps
64+
displayName: Own shared dumps and files
65+
condition: failed()
66+
67+
- publish: $(Build.ArtifactStagingDirectory)/dumps
68+
artifact: DumpsLinux
69+
condition: failed()
70+
71+
- job: windows
72+
displayName: Docker NanoServer
73+
timeoutInMinutes: 150
74+
variables:
75+
DUMPS_SHARE_MOUNT_ROOT: "C:/dumps-share"
76+
DUMPS_SHARE: "$(Build.ArtifactStagingDirectory)/dumps/"
77+
pool:
78+
name: $(DncEngPublicBuildPool)
79+
demands: ImageOverride -equals windows.vs2026.amd64.open
80+
81+
steps:
82+
- checkout: self
83+
clean: true
84+
fetchDepth: 5
85+
fetchTags: false
86+
lfs: false
87+
88+
- powershell: |
89+
$(dockerfilesFolder)/build-docker-sdk.ps1 -w -t $(sdkBaseImage) -c $(BUILD_CONFIGURATION)
90+
echo "##vso[task.setvariable variable=succeeded;isOutput=true]true"
91+
name: buildRuntime
92+
displayName: Build CLR and Libraries
93+
94+
- powershell: |
95+
$(httpStressProject)/run-docker-compose.ps1 -w -o -c $(BUILD_CONFIGURATION) -t $(sdkBaseImage)
96+
echo "##vso[task.setvariable variable=succeeded;isOutput=true]true"
97+
name: buildStress
98+
displayName: Build HttpStress
99+
100+
# 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.
101+
# See: https://github.com/dotnet/runtime/issues/50854
102+
- powershell: |
103+
Set-NetFirewallProfile -Profile Domain, Public, Private -Enabled False
104+
name: disableFirewall
105+
displayName: Disable Firewall
106+
107+
- powershell: |
108+
cd '$(httpStressProject)'
109+
$env:STRESS_CLIENT_ARGS = "$env:HTTPSTRESS_CLIENT_ARGS -http 3.0"
110+
$env:STRESS_SERVER_ARGS = "$env:HTTPSTRESS_SERVER_ARGS -http 3.0"
111+
New-Item -Force $env:DUMPS_SHARE -ItemType Directory
112+
docker-compose up --abort-on-container-exit --no-color
113+
displayName: Run HttpStress - HTTP 3.0
114+
condition: and(eq(variables['buildRuntime.succeeded'], 'true'), eq(variables['buildStress.succeeded'], 'true'))
115+
116+
- powershell: |
117+
cd '$(httpStressProject)'
118+
$env:STRESS_CLIENT_ARGS = "$env:HTTPSTRESS_CLIENT_ARGS -http 2.0"
119+
$env:STRESS_SERVER_ARGS = "$env:HTTPSTRESS_SERVER_ARGS -http 2.0"
120+
New-Item -Force $env:DUMPS_SHARE -ItemType Directory
121+
docker-compose up --abort-on-container-exit --no-color
122+
displayName: Run HttpStress - HTTP 2.0
123+
condition: and(eq(variables['buildRuntime.succeeded'], 'true'), eq(variables['buildStress.succeeded'], 'true'))
124+
125+
- powershell: |
126+
cd '$(httpStressProject)'
127+
$env:STRESS_CLIENT_ARGS = "$env:HTTPSTRESS_CLIENT_ARGS -http 1.1"
128+
$env:STRESS_SERVER_ARGS = "$env:HTTPSTRESS_SERVER_ARGS -http 1.1"
129+
New-Item -Force $env:DUMPS_SHARE -ItemType Directory
130+
docker-compose up --abort-on-container-exit --no-color
131+
displayName: Run HttpStress - HTTP 1.1
132+
condition: and(eq(variables['buildRuntime.succeeded'], 'true'), eq(variables['buildStress.succeeded'], 'true'))
133+
134+
- publish: $(Build.ArtifactStagingDirectory)/dumps
135+
artifact: DumpsWindows
136+
condition: failed()
137+
138+
- powershell: |
139+
Set-NetFirewallProfile -Profile Domain, Public, Private -Enabled True
140+
name: enableFirewall
141+
displayName: Enable Firewall
Lines changed: 2 additions & 153 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,5 @@
11
trigger: none
22

3-
pr:
4-
branches:
5-
include:
6-
- main
7-
- release/*.0
8-
paths:
9-
include:
10-
- src/libraries/System.Net.Http/tests/StressTests/HttpStress/**
11-
- src/libraries/Common/tests/System/Net/StressTests/**
12-
- eng/pipelines/libraries/stress/**
13-
143
schedules:
154
- cron: "0 13 * * *" # 1PM UTC => 5 AM PST
165
displayName: HttpStress nightly run
@@ -29,148 +18,8 @@ variables:
2918
- name: sdkBaseImage
3019
value: dotnet-sdk-libraries-current
3120

32-
3321
extends:
34-
template: /eng/pipelines/common/templates/pipeline-with-resources.yml
22+
template: /eng/pipelines/common/templates/pipeline-with-resources.yml
3523
parameters:
3624
stages:
37-
- stage: Build
38-
jobs:
39-
- job: linux
40-
displayName: Docker Linux
41-
timeoutInMinutes: 240
42-
variables:
43-
DUMPS_SHARE_MOUNT_ROOT: "/dumps-share"
44-
DUMPS_SHARE: "$(Build.ArtifactStagingDirectory)/dumps/"
45-
pool:
46-
name: $(DncEngPublicBuildPool)
47-
demands: ImageOverride -equals build.azurelinux.3.amd64.open
48-
49-
steps:
50-
- checkout: self
51-
clean: true
52-
fetchDepth: 5
53-
fetchTags: false
54-
55-
- bash: |
56-
$(dockerfilesFolder)/build-docker-sdk.sh -t $(sdkBaseImage) -c $(BUILD_CONFIGURATION) && \
57-
echo "##vso[task.setvariable variable=succeeded;isOutput=true]true"
58-
name: buildRuntime
59-
displayName: Build CLR and Libraries
60-
61-
- bash: |
62-
$(httpStressProject)/run-docker-compose.sh -o -c $(BUILD_CONFIGURATION) -t $(sdkBaseImage) && \
63-
echo "##vso[task.setvariable variable=succeeded;isOutput=true]true"
64-
name: buildStress
65-
displayName: Build HttpStress
66-
67-
- bash: |
68-
cd '$(httpStressProject)'
69-
export STRESS_CLIENT_ARGS="$HTTPSTRESS_CLIENT_ARGS -http 3.0"
70-
export STRESS_SERVER_ARGS="$HTTPSTRESS_SERVER_ARGS -http 3.0"
71-
mkdir -p $DUMPS_SHARE
72-
docker compose up --abort-on-container-exit --no-color
73-
timeoutInMinutes: 35 # In case the HTTP/3.0 run hangs, we timeout shortly after the expected 30 minute run
74-
displayName: Run HttpStress - HTTP 3.0
75-
condition: and(eq(variables['buildRuntime.succeeded'], 'true'), eq(variables['buildStress.succeeded'], 'true'))
76-
77-
- bash: |
78-
cd '$(httpStressProject)'
79-
export STRESS_CLIENT_ARGS="$HTTPSTRESS_CLIENT_ARGS -http 2.0"
80-
export STRESS_SERVER_ARGS="$HTTPSTRESS_SERVER_ARGS -http 2.0"
81-
mkdir -p $DUMPS_SHARE
82-
docker compose down
83-
docker compose up --abort-on-container-exit --no-color
84-
displayName: Run HttpStress - HTTP 2.0
85-
condition: and(eq(variables['buildRuntime.succeeded'], 'true'), eq(variables['buildStress.succeeded'], 'true'))
86-
87-
- bash: |
88-
cd '$(httpStressProject)'
89-
export STRESS_CLIENT_ARGS="$HTTPSTRESS_CLIENT_ARGS -http 1.1"
90-
export STRESS_SERVER_ARGS="$HTTPSTRESS_SERVER_ARGS -http 1.1"
91-
mkdir -p $DUMPS_SHARE
92-
docker compose down
93-
docker compose up --abort-on-container-exit --no-color
94-
displayName: Run HttpStress - HTTP 1.1
95-
condition: and(eq(variables['buildRuntime.succeeded'], 'true'), eq(variables['buildStress.succeeded'], 'true'))
96-
97-
- bash: |
98-
sudo chown -R $(id -u):$(id -g) $(Build.ArtifactStagingDirectory)/dumps
99-
displayName: Own shared dumps and files
100-
condition: failed()
101-
102-
- publish: $(Build.ArtifactStagingDirectory)/dumps
103-
artifact: DumpsLinux
104-
condition: failed()
105-
106-
- job: windows
107-
displayName: Docker NanoServer
108-
timeoutInMinutes: 150
109-
variables:
110-
DUMPS_SHARE_MOUNT_ROOT: "C:/dumps-share"
111-
DUMPS_SHARE: "$(Build.ArtifactStagingDirectory)/dumps/"
112-
pool:
113-
name: $(DncEngPublicBuildPool)
114-
demands: ImageOverride -equals windows.vs2026.amd64.open
115-
116-
steps:
117-
- checkout: self
118-
clean: true
119-
fetchDepth: 5
120-
fetchTags: false
121-
lfs: false
122-
123-
- powershell: |
124-
$(dockerfilesFolder)/build-docker-sdk.ps1 -w -t $(sdkBaseImage) -c $(BUILD_CONFIGURATION)
125-
echo "##vso[task.setvariable variable=succeeded;isOutput=true]true"
126-
name: buildRuntime
127-
displayName: Build CLR and Libraries
128-
129-
- powershell: |
130-
$(httpStressProject)/run-docker-compose.ps1 -w -o -c $(BUILD_CONFIGURATION) -t $(sdkBaseImage)
131-
echo "##vso[task.setvariable variable=succeeded;isOutput=true]true"
132-
name: buildStress
133-
displayName: Build HttpStress
134-
135-
# 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.
136-
# See: https://github.com/dotnet/runtime/issues/50854
137-
- powershell: |
138-
Set-NetFirewallProfile -Profile Domain, Public, Private -Enabled False
139-
name: disableFirewall
140-
displayName: Disable Firewall
141-
142-
- powershell: |
143-
cd '$(httpStressProject)'
144-
$env:STRESS_CLIENT_ARGS = "$env:HTTPSTRESS_CLIENT_ARGS -http 3.0"
145-
$env:STRESS_SERVER_ARGS = "$env:HTTPSTRESS_SERVER_ARGS -http 3.0"
146-
New-Item -Force $env:DUMPS_SHARE -ItemType Directory
147-
docker-compose up --abort-on-container-exit --no-color
148-
displayName: Run HttpStress - HTTP 3.0
149-
condition: and(eq(variables['buildRuntime.succeeded'], 'true'), eq(variables['buildStress.succeeded'], 'true'))
150-
151-
- powershell: |
152-
cd '$(httpStressProject)'
153-
$env:STRESS_CLIENT_ARGS = "$env:HTTPSTRESS_CLIENT_ARGS -http 2.0"
154-
$env:STRESS_SERVER_ARGS = "$env:HTTPSTRESS_SERVER_ARGS -http 2.0"
155-
New-Item -Force $env:DUMPS_SHARE -ItemType Directory
156-
docker-compose up --abort-on-container-exit --no-color
157-
displayName: Run HttpStress - HTTP 2.0
158-
condition: and(eq(variables['buildRuntime.succeeded'], 'true'), eq(variables['buildStress.succeeded'], 'true'))
159-
160-
- powershell: |
161-
cd '$(httpStressProject)'
162-
$env:STRESS_CLIENT_ARGS = "$env:HTTPSTRESS_CLIENT_ARGS -http 1.1"
163-
$env:STRESS_SERVER_ARGS = "$env:HTTPSTRESS_SERVER_ARGS -http 1.1"
164-
New-Item -Force $env:DUMPS_SHARE -ItemType Directory
165-
docker-compose up --abort-on-container-exit --no-color
166-
displayName: Run HttpStress - HTTP 1.1
167-
condition: and(eq(variables['buildRuntime.succeeded'], 'true'), eq(variables['buildStress.succeeded'], 'true'))
168-
169-
- publish: $(Build.ArtifactStagingDirectory)/dumps
170-
artifact: DumpsWindows
171-
condition: failed()
172-
173-
- powershell: |
174-
Set-NetFirewallProfile -Profile Domain, Public, Private -Enabled True
175-
name: enableFirewall
176-
displayName: Enable Firewall
25+
- template: /eng/pipelines/libraries/stress/http-stages.yml
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
trigger: none
2+
3+
pr:
4+
branches:
5+
include:
6+
- main
7+
- release/*.0
8+
paths:
9+
include:
10+
- src/libraries/System.Net.Security/tests/StressTests/SslStress/**
11+
- src/libraries/Common/tests/System/Net/StressTests/**
12+
- eng/pipelines/libraries/stress/**
13+
14+
variables:
15+
- template: ../variables.yml
16+
- name: dockerfilesFolder
17+
value: $(Build.SourcesDirectory)/eng/docker
18+
- name: sslStressProject
19+
value: $(sourcesRoot)/System.Net.Security/tests/StressTests/SslStress
20+
- name: sdkBaseImage
21+
value: dotnet-sdk-libraries-current
22+
23+
extends:
24+
template: /eng/pipelines/common/templates/pipeline-with-resources.yml
25+
parameters:
26+
stages:
27+
- template: /eng/pipelines/libraries/stress/ssl-stages.yml

0 commit comments

Comments
 (0)