Skip to content
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
2 changes: 1 addition & 1 deletion tools/pipelines/templates/include-test-perf-benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ parameters:
default: $(Agent.TempDirectory)

steps:
- checkout: git://internal/ff_pipeline_host
- checkout: ff_pipeline_host

- task: Bash@3
displayName: Print parameter/variable values for troubleshooting
Expand Down
46 changes: 34 additions & 12 deletions tools/pipelines/templates/include-test-real-service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,27 @@ parameters:
type: boolean
default: false

# 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.
- name: odspTenantType
type: string
default: none
values:
- none
- prod
- dogfood

# lockBehavior of the stage (if any).
- name: lockBehavior
type: string
default: none
values:
- none
- sequential

stages:
- stage: ${{ parameters.stageId}}
${{ if in(parameters.stageId, 'e2e_routerlicious', 'e2e_frs', 'stress_tests_odspdf', 'stress_tests_frs', 'stress_tests_frs_canary') }}:
lockBehavior: sequential
${{ if ne(parameters.lockBehavior, 'none') }}:
lockBehavior: ${{ parameters.lockBehavior }}
condition: ${{ parameters.condition }}
displayName: ${{ parameters.stageDisplayName }}
dependsOn: ${{ parameters.stageDependencies }}
Expand Down Expand Up @@ -150,7 +167,7 @@ stages:

steps:
# Setup
- checkout: git://internal/ff_pipeline_host
- checkout: ff_pipeline_host
clean: true

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

# Only check out tenants from the tenant pool if we are running tests against ODSP
- ${{ if or(eq(parameters.stageId, 'e2e_odsp'), eq(parameters.stageId, 'stress_tests_odsp')) }}:
- ${{ if ne(parameters.odspTenantType, 'none') }}:
# Retrieve a tenant from the tenant pool
- task: AzureCLI@2
displayName: 'Log in to retrieve tenant credentials'
Expand All @@ -376,19 +393,24 @@ stages:
set -eu -o pipefail

# Increase the maximum time to wait for a tenant to 1 hour to accommodate multiple test runs at the same time.
pnpm exec trips-setup --waitTime=3600 --accessToken=$SYSTEM_ACCESSTOKEN
pnpm exec trips-setup --waitTime=3600 --accessToken=$SYSTEM_ACCESSTOKEN --odspEndpoint=${{ parameters.odspTenantType }}
echo "##vso[task.setvariable variable=tenantSetupSuccess;]true"

# run the test
- task: Npm@1
displayName: '[test] ${{ parameters.testCommand }} ${{ variant.flags }}'
continueOnError: ${{ parameters.continueOnError }}
env:
${{ if and(ne(parameters.stageId, 'e2e_odsp'), ne(parameters.stageId, 'stress_tests_odsp')) }}:
${{ parameters.env }}
${{ else }}:
login__odsp__test__tenants: $(tenantCreds)
${{ each pair in parameters.env }}:
${{ pair.key }}: ${{ pair.value }}
# ODSP tenant setup script injects the values here (appClientId, tenantCreds).
# The e2e test workload references the keys (login__*).
${{ if eq(parameters.odspTenantType, 'dogfood') }}:
login__microsoft__clientId: $(appClientId)
login__odspdf__test__tenants: $(tenantCreds)
${{ elseif eq(parameters.odspTenantType, 'prod') }}:
login__microsoft__clientId: $(appClientId)
login__odsp__test__tenants: $(tenantCreds)
inputs:
command: 'custom'
workingDir: $(Build.SourcesDirectory)/node_modules/${{ parameters.testPackage }}
Expand Down Expand Up @@ -439,8 +461,8 @@ stages:
condition: always()
continueOnError: true # Keep running subsequent tasks even if this one fails (e.g. the tinylicious log wasn't there)

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

# Log Test Failures
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ stages:
- group: ado-feeds

steps:
- checkout: git://internal/ff_pipeline_host
- checkout: ff_pipeline_host

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

Expand Down
5 changes: 5 additions & 0 deletions tools/pipelines/test-dds-stress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ resources:
- release/*
- main
- next
repositories:
Copy link
Contributor Author

@Abe27342 Abe27342 Oct 2, 2025

Choose a reason for hiding this comment

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

Adding these blocks to the pipelines that use ff_pipeline_host allows proper testing of changes to that repo before we check them in, since it means you can queue one of these pipelines while referencing a specific branch in that repository rather than being forced to use main. This is similar to the kind of thing we do for selecting the specific run of 'Build - client packages' when queueing the secondary pipelines.

- repository: ff_pipeline_host
type: git
name: ff_pipeline_host


variables:
- template: /tools/pipelines/templates/include-vars-telemetry-generator.yml@self
Expand Down
5 changes: 5 additions & 0 deletions tools/pipelines/test-perf-benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ resources:
- main
- next
- lts
repositories:
- repository: ff_pipeline_host
type: git
name: ff_pipeline_host


parameters:

Expand Down
12 changes: 8 additions & 4 deletions tools/pipelines/test-real-service-stress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ resources:
- main
- next
- lts
repositories:
- repository: ff_pipeline_host
type: git
name: ff_pipeline_host

variables:
- template: /tools/pipelines/templates/include-vars-telemetry-generator.yml@self
Expand All @@ -42,6 +46,7 @@ stages:
parameters:
stageId: stress_tests_odsp
stageDisplayName: Stress tests - Odsp
odspTenantType: prod
poolBuild: Large-eastus2
testPackage: ${{ variables.testPackage }}
testWorkspace: ${{ variables.testWorkspace }}
Expand All @@ -59,6 +64,7 @@ stages:
parameters:
stageId: stress_tests_odspdf
stageDisplayName: Stress tests - Odspdf
odspTenantType: dogfood
poolBuild: Large-eastus2
testPackage: ${{ variables.testPackage }}
testWorkspace: ${{ variables.testWorkspace }}
Expand All @@ -67,11 +73,7 @@ stages:
testCommand: start:odspdf
skipTestResultPublishing: true
pipelineIdentifierForTelemetry: ${{ variables.pipelineIdentifierForTelemetry }}
stageVariables:
- group: stress-odspdf-lock
env:
login__microsoft__clientId: $(login-microsoft-clientId)
login__odspdf__test__tenants: $(automation-stress-login-odspdf-test-tenants)
FLUID_TEST_LOGGER_PKG_SPECIFIER: '@ff-internal/aria-logger' # Contains getTestLogger impl to inject
FLUID_LOGGER_PROPS: '{ "displayName": "${{variables.pipelineIdentifierForTelemetry}}"}'

Expand Down Expand Up @@ -106,6 +108,7 @@ stages:
artifactBuildId: $(resources.pipeline.client.runID)
timeoutInMinutes: 120
testCommand: start:frs
lockBehavior: sequential
skipTestResultPublishing: true
pipelineIdentifierForTelemetry: ${{ variables.pipelineIdentifierForTelemetry }}
stageVariables:
Expand All @@ -126,6 +129,7 @@ stages:
artifactBuildId: $(resources.pipeline.client.runID)
timeoutInMinutes: 120
testCommand: start:frs:canary
lockBehavior: sequential
skipTestResultPublishing: true
pipelineIdentifierForTelemetry: ${{ variables.pipelineIdentifierForTelemetry }}
stageVariables:
Expand Down
7 changes: 7 additions & 0 deletions tools/pipelines/test-real-service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ resources:
- main
- next
- lts
repositories:
- repository: ff_pipeline_host
type: git
name: ff_pipeline_host

variables:
- template: /tools/pipelines/templates/include-vars-telemetry-generator.yml@self
Expand Down Expand Up @@ -96,6 +100,7 @@ stages:
testWorkspace: ${{ variables.testWorkspace }}
artifactBuildId: $(resources.pipeline.client.runID)
testCommand: test:realsvc:routerlicious:report
lockBehavior: sequential
continueOnError: true
${{ if eq(parameters.useR11sPpeEnvironment, true) }}:
r11sSelfSignedCertSecureFile: wu2-ppe-tls-certificate.pem
Expand Down Expand Up @@ -135,6 +140,7 @@ stages:
timeoutInMinutes: 360
continueOnError: true
testCommand: test:realsvc:frs:report
lockBehavior: sequential
r11sSelfSignedCertSecureFile: wu2-tls-certificate.pem
stageVariables:
- group: e2e-frs-lock
Expand All @@ -160,6 +166,7 @@ stages:
parameters:
stageId: e2e_odsp
stageDisplayName: e2e - odsp
odspTenantType: prod
poolBuild: Small-eastus2
testPackage: ${{ variables.testPackage }}
testWorkspace: ${{ variables.testWorkspace }}
Expand Down