From bd1c2b7250f17bfdf11d5d8490bcfbe1ef5cf9e1 Mon Sep 17 00:00:00 2001 From: Jeff Klouda Date: Wed, 4 Mar 2026 13:54:00 -0800 Subject: [PATCH 1/5] split CDN job --- azure-pipelines.yml | 56 ++++++----------- tools/yaml-templates/cdn-e2e-tests-job.yml | 70 ++++++++++++++++++++++ 2 files changed, 87 insertions(+), 39 deletions(-) create mode 100644 tools/yaml-templates/cdn-e2e-tests-job.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 1faea5b8ce..db690a0793 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -118,45 +118,23 @@ extends: AppHostingSdk: AppHostingSdk versionBranch: 'Latest' - - job: E2ETestCDN - timeoutInMinutes: 120 - displayName: 'E2E Tests - CDN (only runs on release builds)' - # This test only runs after deployment from a release branch and the new CDN version has been deployed - # This check will run on the PR to merge the release branch back into main - condition: and( - eq(variables['Build.Reason'], 'PullRequest'), - startsWith(variables['System.PullRequest.SourceBranch'], 'release/'), - eq(variables['System.PullRequest.TargetBranch'], 'main') - ) - pool: - name: Azure-Pipelines-1ESPT-ExDShared - image: 'ubuntu-latest' - os: linux - steps: - - template: tools/yaml-templates/build-app-host.yml@self - parameters: - appHostGitPath: AppHostingSdk - - - task: CmdLine@2 - displayName: 'Build Test App CDN' - inputs: - script: | - pnpm build-test-app-CDN - workingDirectory: '$(ClientSdkProjectDirectory)' - - - bash: 'pnpm exec ts-node tools/cli/runAppsWithE2ETests.ts --useDataFromLocal=true --reportFileName=e2e-tests-report-cdn-script-tag --envType=cdnScriptTag' - displayName: 'Run E2E integration tests with local script tag on latest cdn bundles' - condition: succeeded() - workingDirectory: '$(AppHostingSdkProjectDirectory)' - enabled: true - - - task: PublishTestResults@2 - inputs: - testResultsFormat: 'JUnit' - testResultsFiles: '**/e2e-tests-report*.xml' - testRunTitle: 'E2E Tests - CDN' - mergeTestResults: true - condition: succeededOrFailed() + # CDN E2E tests split by test name prefix pattern to avoid timeout + # This test only runs after deployment from a release branch and the new CDN version has been deployed + # This check will run on the PR to merge the release branch back into main + - template: tools/yaml-templates/cdn-e2e-tests-job.yml@self + parameters: + testPrefixPatternGroups: + [ + 'app(?=\.)', + '{appE,appI,appS,auth}', + '{[B],[b]}', + '{[C-D],[c-d]}', + '{[E],[e]}', + '{[F-M],[f-m]}', + '{[N-R],[n-r]}', + '{[S],[s]}', + '{[T-Z],[t-z]}', + ] - stage: Perf_and_Android_E2E displayName: 'Perf & Android E2E Tests' diff --git a/tools/yaml-templates/cdn-e2e-tests-job.yml b/tools/yaml-templates/cdn-e2e-tests-job.yml new file mode 100644 index 0000000000..854774160c --- /dev/null +++ b/tools/yaml-templates/cdn-e2e-tests-job.yml @@ -0,0 +1,70 @@ +# This template handles running CDN E2E tests split by test name prefix pattern. +# It will run one E2E job for each testPrefixPattern in the testPrefixPatternGroups parameter. + +parameters: + - name: testPrefixPatternGroups + type: object + default: ['{[A-Z],[a-z],[0-9]}'] + +jobs: + - ${{each testPrefixPattern in parameters.testPrefixPatternGroups}}: + - job: E2ETestsCDN_${{ replace( + replace( + replace( + replace( + replace( + replace( + replace( + replace( + replace( + replace( + replace(replace(replace(testPrefixPattern, '[', 'LB'),']', 'RB'),'{', 'LC'),'}', 'RC'),',', 'COMMA'),'-', 'DASH'), + '*', 'STAR'), + '?', 'QMARK'), + '\', 'BS'), + '.', 'DOT'), + '(', 'LP'), + ')', 'RP'), + '=', 'EQUALS') }} + + timeoutInMinutes: 120 + displayName: 'E2E Tests - CDN - ${{testPrefixPattern}} (only runs on release builds)' + condition: and( + eq(variables['Build.Reason'], 'PullRequest'), + startsWith(variables['System.PullRequest.SourceBranch'], 'release/'), + eq(variables['System.PullRequest.TargetBranch'], 'main') + ) + pool: + name: Azure-Pipelines-1ESPT-ExDShared + image: 'ubuntu-latest' + os: linux + steps: + - template: build-app-host.yml + parameters: + appHostGitPath: AppHostingSdk + + - task: CmdLine@2 + displayName: 'Build Test App CDN' + inputs: + script: | + pnpm build-test-app-CDN + workingDirectory: '$(ClientSdkProjectDirectory)' + + - bash: > + pnpm exec ts-node tools/cli/runAppsWithE2ETests.ts + --useDataFromLocal=true + --testPrefixPattern "${{testPrefixPattern}}" + --reportFileName=e2e-tests-report-cdn-script-tag + --envType=cdnScriptTag + displayName: 'Run E2E CDN tests (${{testPrefixPattern}})' + condition: succeeded() + workingDirectory: '$(AppHostingSdkProjectDirectory)' + enabled: true + + - task: PublishTestResults@2 + inputs: + testResultsFormat: 'JUnit' + testResultsFiles: '**/e2e-tests-report*.xml' + testRunTitle: 'E2E Tests - CDN - ${{testPrefixPattern}}' + mergeTestResults: true + condition: succeededOrFailed() From 212600c2d1d59dbc9cee727558c0ec6815e05ee0 Mon Sep 17 00:00:00 2001 From: Jeff Klouda Date: Wed, 4 Mar 2026 13:54:55 -0800 Subject: [PATCH 2/5] run without condition for testing --- tools/yaml-templates/cdn-e2e-tests-job.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tools/yaml-templates/cdn-e2e-tests-job.yml b/tools/yaml-templates/cdn-e2e-tests-job.yml index 854774160c..364d4efdd3 100644 --- a/tools/yaml-templates/cdn-e2e-tests-job.yml +++ b/tools/yaml-templates/cdn-e2e-tests-job.yml @@ -29,11 +29,7 @@ jobs: timeoutInMinutes: 120 displayName: 'E2E Tests - CDN - ${{testPrefixPattern}} (only runs on release builds)' - condition: and( - eq(variables['Build.Reason'], 'PullRequest'), - startsWith(variables['System.PullRequest.SourceBranch'], 'release/'), - eq(variables['System.PullRequest.TargetBranch'], 'main') - ) + condition: succeeded() pool: name: Azure-Pipelines-1ESPT-ExDShared image: 'ubuntu-latest' From c78d6e43f214c70cbbe47a0dedbc1db51291bc28 Mon Sep 17 00:00:00 2001 From: Jeff Klouda Date: Wed, 4 Mar 2026 14:02:29 -0800 Subject: [PATCH 3/5] fewer jobs --- azure-pipelines.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index db690a0793..7d0d24c155 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -167,6 +167,7 @@ extends: mergeTestResults: true condition: succeededOrFailed() + - job: E2ETestAndroidA displayName: 'E2E Tests - Android - Plan A' pool: From 7c02b5a16c0ac7dc813aa67864f0f07502af53b0 Mon Sep 17 00:00:00 2001 From: Jeff Klouda Date: Wed, 4 Mar 2026 15:00:17 -0800 Subject: [PATCH 4/5] restore conditions --- tools/yaml-templates/cdn-e2e-tests-job.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/yaml-templates/cdn-e2e-tests-job.yml b/tools/yaml-templates/cdn-e2e-tests-job.yml index 364d4efdd3..854774160c 100644 --- a/tools/yaml-templates/cdn-e2e-tests-job.yml +++ b/tools/yaml-templates/cdn-e2e-tests-job.yml @@ -29,7 +29,11 @@ jobs: timeoutInMinutes: 120 displayName: 'E2E Tests - CDN - ${{testPrefixPattern}} (only runs on release builds)' - condition: succeeded() + condition: and( + eq(variables['Build.Reason'], 'PullRequest'), + startsWith(variables['System.PullRequest.SourceBranch'], 'release/'), + eq(variables['System.PullRequest.TargetBranch'], 'main') + ) pool: name: Azure-Pipelines-1ESPT-ExDShared image: 'ubuntu-latest' From e9d3d6e3cfae43b951e26d843b2cbeacae5be60a Mon Sep 17 00:00:00 2001 From: Jeff Klouda Date: Wed, 22 Apr 2026 14:57:06 -0700 Subject: [PATCH 5/5] Run select CDN tests --- azure-pipelines.yml | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 7d0d24c155..727028c5fe 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -124,17 +124,7 @@ extends: - template: tools/yaml-templates/cdn-e2e-tests-job.yml@self parameters: testPrefixPatternGroups: - [ - 'app(?=\.)', - '{appE,appI,appS,auth}', - '{[B],[b]}', - '{[C-D],[c-d]}', - '{[E],[e]}', - '{[F-M],[f-m]}', - '{[N-R],[n-r]}', - '{[S],[s]}', - '{[T-Z],[t-z]}', - ] + ['app(?=\.)','{appE,appI,appS,auth}'] - stage: Perf_and_Android_E2E displayName: 'Perf & Android E2E Tests'