Skip to content

Commit ecc1b5b

Browse files
Abe27342Abram Sanderson
andauthored
Use TRIPS for odspdf stress runs (#25599)
## Description Updates `include-test-real-service` to support odspdf TRIPS tenants. I did some minor refactoring for parameter clarity while in the area. Test runs: - e2e tests before trips-setup package update in the host repo [here](https://dev.azure.com/fluidframework/internal/_build/results?buildId=358461&view=results) (unaffected, as it should be) - Stress run using updated trips-setup [here](https://dev.azure.com/fluidframework/internal/_build/results?buildId=358690&view=results) --------- Co-authored-by: Abram Sanderson <absander@microsoft.com>
1 parent fa499b0 commit ecc1b5b

File tree

7 files changed

+61
-18
lines changed

7 files changed

+61
-18
lines changed

tools/pipelines/templates/include-test-perf-benchmarks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ parameters:
2929
default: $(Agent.TempDirectory)
3030

3131
steps:
32-
- checkout: git://internal/ff_pipeline_host
32+
- checkout: ff_pipeline_host
3333

3434
- task: Bash@3
3535
displayName: Print parameter/variable values for troubleshooting

tools/pipelines/templates/include-test-real-service.yml

Lines changed: 34 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,27 @@ parameters:
109109
type: boolean
110110
default: false
111111

112+
# If tests need to run against an ODSP tenant, specify the type of tenant here. Steps will be injected to lease one for the duration of the test.
113+
- name: odspTenantType
114+
type: string
115+
default: none
116+
values:
117+
- none
118+
- prod
119+
- dogfood
120+
121+
# lockBehavior of the stage (if any).
122+
- name: lockBehavior
123+
type: string
124+
default: none
125+
values:
126+
- none
127+
- sequential
128+
112129
stages:
113130
- stage: ${{ parameters.stageId}}
114-
${{ if in(parameters.stageId, 'e2e_routerlicious', 'e2e_frs', 'stress_tests_odspdf', 'stress_tests_frs', 'stress_tests_frs_canary') }}:
115-
lockBehavior: sequential
131+
${{ if ne(parameters.lockBehavior, 'none') }}:
132+
lockBehavior: ${{ parameters.lockBehavior }}
116133
condition: ${{ parameters.condition }}
117134
displayName: ${{ parameters.stageDisplayName }}
118135
dependsOn: ${{ parameters.stageDependencies }}
@@ -150,7 +167,7 @@ stages:
150167

151168
steps:
152169
# Setup
153-
- checkout: git://internal/ff_pipeline_host
170+
- checkout: ff_pipeline_host
154171
clean: true
155172

156173
# Install self-signed cert for R11s deployment in local cert store
@@ -351,7 +368,7 @@ stages:
351368
path: $(compatVersionInstallsPath)
352369

353370
# Only check out tenants from the tenant pool if we are running tests against ODSP
354-
- ${{ if or(eq(parameters.stageId, 'e2e_odsp'), eq(parameters.stageId, 'stress_tests_odsp')) }}:
371+
- ${{ if ne(parameters.odspTenantType, 'none') }}:
355372
# Retrieve a tenant from the tenant pool
356373
- task: AzureCLI@2
357374
displayName: 'Log in to retrieve tenant credentials'
@@ -376,19 +393,24 @@ stages:
376393
set -eu -o pipefail
377394
378395
# Increase the maximum time to wait for a tenant to 1 hour to accommodate multiple test runs at the same time.
379-
pnpm exec trips-setup --waitTime=3600 --accessToken=$SYSTEM_ACCESSTOKEN
396+
pnpm exec trips-setup --waitTime=3600 --accessToken=$SYSTEM_ACCESSTOKEN --odspEndpoint=${{ parameters.odspTenantType }}
380397
echo "##vso[task.setvariable variable=tenantSetupSuccess;]true"
381398
382399
# run the test
383400
- task: Npm@1
384401
displayName: '[test] ${{ parameters.testCommand }} ${{ variant.flags }}'
385402
continueOnError: ${{ parameters.continueOnError }}
386403
env:
387-
${{ if and(ne(parameters.stageId, 'e2e_odsp'), ne(parameters.stageId, 'stress_tests_odsp')) }}:
388-
${{ parameters.env }}
389-
${{ else }}:
390-
login__odsp__test__tenants: $(tenantCreds)
404+
${{ each pair in parameters.env }}:
405+
${{ pair.key }}: ${{ pair.value }}
406+
# ODSP tenant setup script injects the values here (appClientId, tenantCreds).
407+
# The e2e test workload references the keys (login__*).
408+
${{ if eq(parameters.odspTenantType, 'dogfood') }}:
409+
login__microsoft__clientId: $(appClientId)
410+
login__odspdf__test__tenants: $(tenantCreds)
411+
${{ elseif eq(parameters.odspTenantType, 'prod') }}:
391412
login__microsoft__clientId: $(appClientId)
413+
login__odsp__test__tenants: $(tenantCreds)
392414
inputs:
393415
command: 'custom'
394416
workingDir: $(Build.SourcesDirectory)/node_modules/${{ parameters.testPackage }}
@@ -439,8 +461,8 @@ stages:
439461
condition: always()
440462
continueOnError: true # Keep running subsequent tasks even if this one fails (e.g. the tinylicious log wasn't there)
441463

442-
# Only release tenants that were checked out from the tenant pool for ODSP tests
443-
- ${{ if or(eq(parameters.stageId, 'e2e_odsp'), eq(parameters.stageId, 'stress_tests_odsp')) }}:
464+
# Only release tenants that were checked out from the tenant pool for ODSP/ODSPDF tests
465+
- ${{ if ne(parameters.odspTenantType, 'none') }}:
444466
# Login to release tenant credentials
445467
# Currently, some of the compat tests run for longer than 60 minutes and exceed the average token lifetime:
446468
# https://learn.microsoft.com/en-us/entra/identity-platform/configurable-token-lifetimes#access-tokens
@@ -464,7 +486,7 @@ stages:
464486
targetType: 'inline'
465487
script: |
466488
set -eu -o pipefail
467-
pnpm exec trips-cleanup --reservationId=$(stringBearerToken)
489+
pnpm exec trips-cleanup --reservationId=$(stringBearerToken) --odspEndpoint=${{ parameters.odspTenantType }}
468490
condition: eq(variables['tenantSetupSuccess'], 'true')
469491

470492
# Log Test Failures

tools/pipelines/templates/include-upload-stage-telemetry.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ stages:
4242
- group: ado-feeds
4343

4444
steps:
45-
- checkout: git://internal/ff_pipeline_host
45+
- checkout: ff_pipeline_host
4646

4747
- template: /tools/pipelines/templates/include-use-node-version.yml@self
4848

tools/pipelines/test-dds-stress.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ resources:
1818
- release/*
1919
- main
2020
- next
21+
repositories:
22+
- repository: ff_pipeline_host
23+
type: git
24+
name: ff_pipeline_host
25+
2126

2227
variables:
2328
- template: /tools/pipelines/templates/include-vars-telemetry-generator.yml@self

tools/pipelines/test-perf-benchmarks.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ resources:
1717
- main
1818
- next
1919
- lts
20+
repositories:
21+
- repository: ff_pipeline_host
22+
type: git
23+
name: ff_pipeline_host
24+
2025

2126
parameters:
2227

tools/pipelines/test-real-service-stress.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ resources:
1919
- main
2020
- next
2121
- lts
22+
repositories:
23+
- repository: ff_pipeline_host
24+
type: git
25+
name: ff_pipeline_host
2226

2327
variables:
2428
- template: /tools/pipelines/templates/include-vars-telemetry-generator.yml@self
@@ -42,6 +46,7 @@ stages:
4246
parameters:
4347
stageId: stress_tests_odsp
4448
stageDisplayName: Stress tests - Odsp
49+
odspTenantType: prod
4550
poolBuild: Large-eastus2
4651
testPackage: ${{ variables.testPackage }}
4752
testWorkspace: ${{ variables.testWorkspace }}
@@ -59,6 +64,7 @@ stages:
5964
parameters:
6065
stageId: stress_tests_odspdf
6166
stageDisplayName: Stress tests - Odspdf
67+
odspTenantType: dogfood
6268
poolBuild: Large-eastus2
6369
testPackage: ${{ variables.testPackage }}
6470
testWorkspace: ${{ variables.testWorkspace }}
@@ -67,11 +73,7 @@ stages:
6773
testCommand: start:odspdf
6874
skipTestResultPublishing: true
6975
pipelineIdentifierForTelemetry: ${{ variables.pipelineIdentifierForTelemetry }}
70-
stageVariables:
71-
- group: stress-odspdf-lock
7276
env:
73-
login__microsoft__clientId: $(login-microsoft-clientId)
74-
login__odspdf__test__tenants: $(automation-stress-login-odspdf-test-tenants)
7577
FLUID_TEST_LOGGER_PKG_SPECIFIER: '@ff-internal/aria-logger' # Contains getTestLogger impl to inject
7678
FLUID_LOGGER_PROPS: '{ "displayName": "${{variables.pipelineIdentifierForTelemetry}}"}'
7779

@@ -106,6 +108,7 @@ stages:
106108
artifactBuildId: $(resources.pipeline.client.runID)
107109
timeoutInMinutes: 120
108110
testCommand: start:frs
111+
lockBehavior: sequential
109112
skipTestResultPublishing: true
110113
pipelineIdentifierForTelemetry: ${{ variables.pipelineIdentifierForTelemetry }}
111114
stageVariables:
@@ -126,6 +129,7 @@ stages:
126129
artifactBuildId: $(resources.pipeline.client.runID)
127130
timeoutInMinutes: 120
128131
testCommand: start:frs:canary
132+
lockBehavior: sequential
129133
skipTestResultPublishing: true
130134
pipelineIdentifierForTelemetry: ${{ variables.pipelineIdentifierForTelemetry }}
131135
stageVariables:

tools/pipelines/test-real-service.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ resources:
2929
- main
3030
- next
3131
- lts
32+
repositories:
33+
- repository: ff_pipeline_host
34+
type: git
35+
name: ff_pipeline_host
3236

3337
variables:
3438
- template: /tools/pipelines/templates/include-vars-telemetry-generator.yml@self
@@ -96,6 +100,7 @@ stages:
96100
testWorkspace: ${{ variables.testWorkspace }}
97101
artifactBuildId: $(resources.pipeline.client.runID)
98102
testCommand: test:realsvc:routerlicious:report
103+
lockBehavior: sequential
99104
continueOnError: true
100105
${{ if eq(parameters.useR11sPpeEnvironment, true) }}:
101106
r11sSelfSignedCertSecureFile: wu2-ppe-tls-certificate.pem
@@ -135,6 +140,7 @@ stages:
135140
timeoutInMinutes: 360
136141
continueOnError: true
137142
testCommand: test:realsvc:frs:report
143+
lockBehavior: sequential
138144
r11sSelfSignedCertSecureFile: wu2-tls-certificate.pem
139145
stageVariables:
140146
- group: e2e-frs-lock
@@ -160,6 +166,7 @@ stages:
160166
parameters:
161167
stageId: e2e_odsp
162168
stageDisplayName: e2e - odsp
169+
odspTenantType: prod
163170
poolBuild: Small-eastus2
164171
testPackage: ${{ variables.testPackage }}
165172
testWorkspace: ${{ variables.testWorkspace }}

0 commit comments

Comments
 (0)