From f5da232377b4d99adbcd0a5a9e6236ae3f4bc38e Mon Sep 17 00:00:00 2001 From: Abram Sanderson Date: Thu, 25 Sep 2025 10:25:57 -0700 Subject: [PATCH 01/15] Use ff_pipeline_host for perf-benchmark pipeline --- ...e-test-perf-benchmarks-install-package.yml | 2 +- .../include-test-perf-benchmarks.yml | 42 ++++--------------- tools/pipelines/test-perf-benchmarks.yml | 24 ++++------- 3 files changed, 17 insertions(+), 51 deletions(-) diff --git a/tools/pipelines/templates/include-test-perf-benchmarks-install-package.yml b/tools/pipelines/templates/include-test-perf-benchmarks-install-package.yml index d2183e105962..6e8e10d10a9c 100644 --- a/tools/pipelines/templates/include-test-perf-benchmarks-install-package.yml +++ b/tools/pipelines/templates/include-test-perf-benchmarks-install-package.yml @@ -108,7 +108,7 @@ steps: ls -1 $TEST_PACKAGE_PATH_PATTERN if [[ `ls -1 $TEST_PACKAGE_PATH_PATTERN | wc -l` -eq 1 ]]; then - npm install $(ls $TEST_PACKAGE_PATH_PATTERN) + pnpm install $(ls $TEST_PACKAGE_PATH_PATTERN) else echo "##vso[task.logissue type=error]Test package '${{ parameters.testPackageName }}' not found, or more than one possible match found. See messages above." exit -1 diff --git a/tools/pipelines/templates/include-test-perf-benchmarks.yml b/tools/pipelines/templates/include-test-perf-benchmarks.yml index 10751ecedaec..aab5964a9987 100644 --- a/tools/pipelines/templates/include-test-perf-benchmarks.yml +++ b/tools/pipelines/templates/include-test-perf-benchmarks.yml @@ -15,28 +15,18 @@ parameters: - name: artifactBuildId type: string -# Path where the packages with perf tests will be installed. -# The template will create it, and install aria-logger in it. -- name: testWorkspace - type: string - # Path to the folder where the test files artifact should be downloaded. - name: testFilesPath type: string -# Path where the telemetry-generator package should be installed. -# It should be an empty directory so that it doesn't interfere with anything else. -# The caller of this template will need to know this in order to point to the correct locations for the handlers, -# which will be under /node_modules/@ff-internal/telemetry-generator/dist/handlers/. -- name: pathForTelemetryGeneratorInstall - type: string - # Name of the service that the tests are running against. - name: endpointName type: string default: '' steps: +- checkout: git://internal/ff_pipeline_host + - task: Bash@3 displayName: Print parameter/variable values for troubleshooting inputs: @@ -48,17 +38,20 @@ steps: artifactBuildId=${{ parameters.artifactBuildId }} artifactPipeline=${{ parameters.artifactPipeline }} testFilesPath=${{ parameters.testFilesPath }} - testWorkspace=${{ parameters.testWorkspace }} Build Params SourceBranch=$(Build.SourceBranch) " +# Note: there is some duplication between the .npmrc setup here, the pnpm configuration in the next step, and the +# base .npmrc file in ff_pipeline_host which could be cleaned up. - template: /tools/pipelines/templates/include-setup-npmrc-for-download.yml@self -- template: /tools/pipelines/templates/include-telemetry-setup.yml@self +- template: /tools/pipelines/templates/include-install.yml@self parameters: - pathForTelemetryGeneratorInstall: ${{ parameters.pathForTelemetryGeneratorInstall }} + packageManager: pnpm + buildDirectory: $(Build.SourcesDirectory) + packageManagerInstallCommand: pnpm install # Download artifact with test files - task: DownloadPipelineArtifact@2 @@ -80,22 +73,6 @@ steps: # allowPartiallySucceededBuilds: true # No effect as long as we have buildVersionToDownload: specific # branchName: $(Build.SourceBranch) # No effect as long as we have buildVersionToDownload: specific -- task: Bash@3 - displayName: Create test directory - inputs: - targetType: 'inline' - script: | - mkdir ${{ parameters.testWorkspace }} - -# Install aria-logger -- task: Bash@3 - displayName: 'npm install aria logger' - retryCountOnTaskFailure: 4 - inputs: - workingDirectory: ${{ parameters.testWorkspace }} - targetType: 'inline' - script: 'npm install @ff-internal/aria-logger' - - ${{ if eq(parameters.endpointName, 'odsp') }}: # Log in to Azure to retrieve tenant credentials - task: AzureCLI@2 @@ -117,11 +94,10 @@ steps: env: SYSTEM_ACCESSTOKEN: $(System.AccessToken) inputs: - workingDirectory: ${{ parameters.testWorkspace }} targetType: 'inline' script: | 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. - npx --package=@ff-internal/trips-setup@0.0.5 -- trips-setup --waitTime=3600 --accessToken=$SYSTEM_ACCESSTOKEN + pnpm exec trips-setup --waitTime=3600 --accessToken=$SYSTEM_ACCESSTOKEN echo "##vso[task.setvariable variable=tenantSetupSuccess;]true" diff --git a/tools/pipelines/test-perf-benchmarks.yml b/tools/pipelines/test-perf-benchmarks.yml index 2a14468a53b1..e15c36feafd4 100644 --- a/tools/pipelines/test-perf-benchmarks.yml +++ b/tools/pipelines/test-perf-benchmarks.yml @@ -66,7 +66,7 @@ variables: value: 1 readonly: true - name: testWorkspace - value: $(Pipeline.Workspace)/test + value: $(Build.SourcesDirectory) readonly: true - name: testFilesPath value: $(Pipeline.Workspace)/test-files @@ -108,7 +108,6 @@ stages: artifactPipeline: $(artifactPipeline) testFilesPath: $(testFilesPath) testWorkspace: $(testWorkspace) - pathForTelemetryGeneratorInstall: $(pathToTelemetryGenerator) # Run tests for each package that has them - ${{ each testPackage in parameters.executionTestPackages }}: @@ -182,12 +181,11 @@ stages: displayName: Write measurements to Aria/Kusto inputs: targetType: 'inline' - workingDirectory: $(pathToTelemetryGenerator) script: | set -eu -o pipefail echo "Write the following benchmark output to Aria/Kusto" ls -laR ${{ variables.consolidatedTestsOutputFolder }}; - npx telemetry-generator --handlerModule $(pathToTelemetryGeneratorHandlers)/executionTimeTestHandler.js --dir '${{ variables.consolidatedTestsOutputFolder }}'; + pnpm exec telemetry-generator --handlerModule $(pathToTelemetryGeneratorHandlers)/executionTimeTestHandler.js --dir '${{ variables.consolidatedTestsOutputFolder }}'; - task: PublishPipelineArtifact@1 displayName: Publish Artifact - Perf tests output - execution time @@ -224,7 +222,6 @@ stages: artifactPipeline: $(artifactPipeline) testFilesPath: $(testFilesPath) testWorkspace: $(testWorkspace) - pathForTelemetryGeneratorInstall: $(pathToTelemetryGenerator) # Run tests for each package that has them - ${{ each testPackage in parameters.memoryTestPackages }}: @@ -298,12 +295,11 @@ stages: displayName: Write measurements to Aria/Kusto inputs: targetType: 'inline' - workingDirectory: $(pathToTelemetryGenerator) script: | set -eu -o pipefail echo "Write the following benchmark output to Aria/Kusto"; ls -laR ${{ variables.consolidatedTestsOutputFolder }}; - npx telemetry-generator --handlerModule $(pathToTelemetryGeneratorHandlers)/memoryUsageTestHandler.js --dir ${{ variables.consolidatedTestsOutputFolder }}; + pnpm exec telemetry-generator --handlerModule $(pathToTelemetryGeneratorHandlers)/memoryUsageTestHandler.js --dir ${{ variables.consolidatedTestsOutputFolder }}; - task: PublishPipelineArtifact@1 displayName: Publish Artifact - Perf tests output - memory usage @@ -339,7 +335,6 @@ stages: artifactPipeline: $(artifactPipeline) testFilesPath: $(testFilesPath) testWorkspace: $(testWorkspace) - pathForTelemetryGeneratorInstall: $(pathToTelemetryGenerator) # Run tests for each package that has them - ${{ each testPackage in parameters.customBenchmarkTestPackages }}: @@ -412,12 +407,11 @@ stages: displayName: Write measurements to Aria/Kusto inputs: targetType: 'inline' - workingDirectory: $(pathToTelemetryGenerator) script: | set -eu -o pipefail echo "Write the following benchmark output to Aria/Kusto"; ls -laR ${{ variables.consolidatedTestsOutputFolder }}; - npx telemetry-generator --handlerModule $(pathToTelemetryGeneratorHandlers)/customBenchmarkHandler.js --dir ${{ variables.consolidatedTestsOutputFolder }}; + pnpm exec telemetry-generator --handlerModule $(pathToTelemetryGeneratorHandlers)/customBenchmarkHandler.js --dir ${{ variables.consolidatedTestsOutputFolder }}; - task: PublishPipelineArtifact@1 displayName: Publish Artifact - Perf tests output - custom data usage @@ -468,8 +462,6 @@ stages: artifactBuildId: $(artifactBuildId) artifactPipeline: $(artifactPipeline) testFilesPath: $(testFilesPath) - testWorkspace: $(testWorkspace) - pathForTelemetryGeneratorInstall: $(pathToTelemetryGenerator) endpointName: ${{ endpointObject.endpointName }} # Download and install package with performance tests @@ -551,12 +543,11 @@ stages: condition: succeededOrFailed() inputs: targetType: 'inline' - workingDirectory: $(pathToTelemetryGenerator) script: | set -eu -o pipefail echo "Writing the following performance tests results to Aria/Kusto - ${{ endpointObject.endpointName }}" ls -la ${{ variables.executionTimeTestOutputFolder }}; - npx telemetry-generator --handlerModule $(pathToTelemetryGeneratorHandlers)/executionTimeTestHandler.js --dir ${{ variables.executionTimeTestOutputFolder }}; + pnpm exec telemetry-generator --handlerModule $(pathToTelemetryGeneratorHandlers)/executionTimeTestHandler.js --dir ${{ variables.executionTimeTestOutputFolder }}; env: FLUID_ENDPOINTNAME: ${{ endpointObject.endpointName }} @@ -565,12 +556,11 @@ stages: condition: succeededOrFailed() inputs: targetType: 'inline' - workingDirectory: $(pathToTelemetryGenerator) script: | set -eu -o pipefail echo "Writing the following performance tests results to Aria/Kusto - ${{ endpointObject.endpointName }}" ls -la ${{ variables.memoryUsageTestOutputFolder }}; - npx telemetry-generator --handlerModule $(pathToTelemetryGeneratorHandlers)/memoryUsageTestHandler.js --dir ${{ variables.memoryUsageTestOutputFolder }}; + pnpm exec telemetry-generator --handlerModule $(pathToTelemetryGeneratorHandlers)/memoryUsageTestHandler.js --dir ${{ variables.memoryUsageTestOutputFolder }}; env: FLUID_ENDPOINTNAME: ${{ endpointObject.endpointName }} @@ -626,7 +616,7 @@ stages: script: | set -eu -o pipefail - npx --package=@ff-internal/trips-setup@0.0.5 -- trips-cleanup --reservationId=$(stringBearerToken) + pnpm exec trips-cleanup --reservationId=$(stringBearerToken) condition: eq(variables['tenantSetupSuccess'], 'true') - template: /tools/pipelines/templates/include-upload-npm-logs.yml@self From 06149256ce725e5e5cc4448a7bf28ea5dd893b7b Mon Sep 17 00:00:00 2001 From: Abram Sanderson Date: Thu, 25 Sep 2025 10:31:47 -0700 Subject: [PATCH 02/15] Remove some extra params --- tools/pipelines/test-perf-benchmarks.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/tools/pipelines/test-perf-benchmarks.yml b/tools/pipelines/test-perf-benchmarks.yml index e15c36feafd4..6df85839ab1b 100644 --- a/tools/pipelines/test-perf-benchmarks.yml +++ b/tools/pipelines/test-perf-benchmarks.yml @@ -107,7 +107,6 @@ stages: artifactBuildId: $(artifactBuildId) artifactPipeline: $(artifactPipeline) testFilesPath: $(testFilesPath) - testWorkspace: $(testWorkspace) # Run tests for each package that has them - ${{ each testPackage in parameters.executionTestPackages }}: @@ -221,7 +220,6 @@ stages: artifactBuildId: $(artifactBuildId) artifactPipeline: $(artifactPipeline) testFilesPath: $(testFilesPath) - testWorkspace: $(testWorkspace) # Run tests for each package that has them - ${{ each testPackage in parameters.memoryTestPackages }}: @@ -334,7 +332,6 @@ stages: artifactBuildId: $(artifactBuildId) artifactPipeline: $(artifactPipeline) testFilesPath: $(testFilesPath) - testWorkspace: $(testWorkspace) # Run tests for each package that has them - ${{ each testPackage in parameters.customBenchmarkTestPackages }}: From 4c1afb32a6b60b05a5b9b56c4926efd5aaeda4aa Mon Sep 17 00:00:00 2001 From: Abram Sanderson Date: Thu, 25 Sep 2025 10:53:03 -0700 Subject: [PATCH 03/15] Tweak install steps --- tools/pipelines/templates/include-install.yml | 10 ++++++++++ .../templates/include-setup-npmrc-for-download.yml | 11 +++++------ .../templates/include-test-perf-benchmarks.yml | 8 ++++++++ 3 files changed, 23 insertions(+), 6 deletions(-) diff --git a/tools/pipelines/templates/include-install.yml b/tools/pipelines/templates/include-install.yml index 153b428a5a09..81e1d471c491 100644 --- a/tools/pipelines/templates/include-install.yml +++ b/tools/pipelines/templates/include-install.yml @@ -13,11 +13,21 @@ parameters: - name: packageManagerInstallCommand type: string +- name: primaryRegistry + type: string + default: $(ado-feeds-primary-registry) + +- name: userNpmrcPath + type: string + default: $(Agent.TempDirectory)/.npmrc + steps: - ${{ if eq(parameters.packageManager, 'pnpm') }}: - template: /tools/pipelines/templates/include-install-pnpm.yml@self parameters: buildDirectory: ${{ parameters.buildDirectory }} + primaryRegistry: ${{ parameters.primaryRegistry }} + userNpmrcPath: ${{ parameters.userNpmrcPath }} - task: Bash@3 displayName: Install dependencies diff --git a/tools/pipelines/templates/include-setup-npmrc-for-download.yml b/tools/pipelines/templates/include-setup-npmrc-for-download.yml index 9653291d649b..dc23215c94ab 100644 --- a/tools/pipelines/templates/include-setup-npmrc-for-download.yml +++ b/tools/pipelines/templates/include-setup-npmrc-for-download.yml @@ -12,8 +12,7 @@ parameters: # Location for the .npmrc file. -# NOTE: Do not override the default value. It's a parameter just for reusability. -- name: npmrcLocation +- name: userNpmrcPath type: string default: $(Agent.TempDirectory)/global-download-npmrc @@ -43,8 +42,8 @@ steps: script: | set -eu -o pipefail - mkdir -p ${{ parameters.npmrcLocation }} - cd ${{ parameters.npmrcLocation }} + mkdir -p ${{ parameters.userNpmrcPath }} + cd ${{ parameters.userNpmrcPath }} echo "Generating .npmrc" @@ -57,14 +56,14 @@ steps: displayName: 'Authenticate to internal ADO feeds' retryCountOnTaskFailure: 1 inputs: - workingFile: ${{ parameters.npmrcLocation }}/.npmrc + workingFile: ${{ parameters.userNpmrcPath }}/.npmrc - task: Bash@3 displayName: Use the authenticated .npmrc file globally inputs: targetType: 'inline' script: | - TARGET_FILE=${{ parameters.npmrcLocation }}/.npmrc + TARGET_FILE=${{ parameters.userNpmrcPath }}/.npmrc # Configure the copied file to be the default user-level .npmrc file, so all invocations of npm use it. # Particularly relevant for the ones that occur when we install older version for compat tests. diff --git a/tools/pipelines/templates/include-test-perf-benchmarks.yml b/tools/pipelines/templates/include-test-perf-benchmarks.yml index aab5964a9987..2ada5f2bb5d7 100644 --- a/tools/pipelines/templates/include-test-perf-benchmarks.yml +++ b/tools/pipelines/templates/include-test-perf-benchmarks.yml @@ -24,6 +24,10 @@ parameters: type: string default: '' +- name: userNpmrcPath + type: string + default: $(Agent.TempDirectory)/.npmrc + steps: - checkout: git://internal/ff_pipeline_host @@ -46,12 +50,16 @@ steps: # Note: there is some duplication between the .npmrc setup here, the pnpm configuration in the next step, and the # base .npmrc file in ff_pipeline_host which could be cleaned up. - template: /tools/pipelines/templates/include-setup-npmrc-for-download.yml@self + parameters: + userNpmrcPath: ${{ parameters.userNpmrcPath }} - template: /tools/pipelines/templates/include-install.yml@self parameters: packageManager: pnpm buildDirectory: $(Build.SourcesDirectory) packageManagerInstallCommand: pnpm install + primaryRegistry: $(ado-feeds-ff-download-only) + userNpmrcPath: ${{ parameters.userNpmrcPath }} # Download artifact with test files - task: DownloadPipelineArtifact@2 From 605a361c36630b6e270011ba410248be1b1d0633 Mon Sep 17 00:00:00 2001 From: Abram Sanderson Date: Thu, 25 Sep 2025 11:01:37 -0700 Subject: [PATCH 04/15] Use same .npmrc --- .../templates/include-setup-npmrc-for-download.yml | 2 +- .../pipelines/templates/include-test-perf-benchmarks.yml | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/pipelines/templates/include-setup-npmrc-for-download.yml b/tools/pipelines/templates/include-setup-npmrc-for-download.yml index dc23215c94ab..634f1dc97b37 100644 --- a/tools/pipelines/templates/include-setup-npmrc-for-download.yml +++ b/tools/pipelines/templates/include-setup-npmrc-for-download.yml @@ -12,7 +12,7 @@ parameters: # Location for the .npmrc file. -- name: userNpmrcPath +- name: userNpmrcDirectory type: string default: $(Agent.TempDirectory)/global-download-npmrc diff --git a/tools/pipelines/templates/include-test-perf-benchmarks.yml b/tools/pipelines/templates/include-test-perf-benchmarks.yml index 2ada5f2bb5d7..8c9d6a420be3 100644 --- a/tools/pipelines/templates/include-test-perf-benchmarks.yml +++ b/tools/pipelines/templates/include-test-perf-benchmarks.yml @@ -24,9 +24,9 @@ parameters: type: string default: '' -- name: userNpmrcPath +- name: userNpmrcDirectory type: string - default: $(Agent.TempDirectory)/.npmrc + default: $(Agent.TempDirectory) steps: - checkout: git://internal/ff_pipeline_host @@ -51,7 +51,7 @@ steps: # base .npmrc file in ff_pipeline_host which could be cleaned up. - template: /tools/pipelines/templates/include-setup-npmrc-for-download.yml@self parameters: - userNpmrcPath: ${{ parameters.userNpmrcPath }} + userNpmrcPath: ${{ parameters.userNpmrcDirectory }} - template: /tools/pipelines/templates/include-install.yml@self parameters: @@ -59,7 +59,7 @@ steps: buildDirectory: $(Build.SourcesDirectory) packageManagerInstallCommand: pnpm install primaryRegistry: $(ado-feeds-ff-download-only) - userNpmrcPath: ${{ parameters.userNpmrcPath }} + userNpmrcPath: ${{ parameters.userNpmrcDirectory }}/.npmrc # Download artifact with test files - task: DownloadPipelineArtifact@2 From 6a4d11eecfd27047b8bd236fc29373750a1e8ec5 Mon Sep 17 00:00:00 2001 From: Abram Sanderson Date: Thu, 25 Sep 2025 11:02:11 -0700 Subject: [PATCH 05/15] update var name --- tools/pipelines/templates/include-test-perf-benchmarks.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/pipelines/templates/include-test-perf-benchmarks.yml b/tools/pipelines/templates/include-test-perf-benchmarks.yml index 8c9d6a420be3..919bcdc8f343 100644 --- a/tools/pipelines/templates/include-test-perf-benchmarks.yml +++ b/tools/pipelines/templates/include-test-perf-benchmarks.yml @@ -51,7 +51,7 @@ steps: # base .npmrc file in ff_pipeline_host which could be cleaned up. - template: /tools/pipelines/templates/include-setup-npmrc-for-download.yml@self parameters: - userNpmrcPath: ${{ parameters.userNpmrcDirectory }} + userNpmrcDirectory: ${{ parameters.userNpmrcDirectory }} - template: /tools/pipelines/templates/include-install.yml@self parameters: From 02e364d3fffe30916f218f1b42bd65169255f648 Mon Sep 17 00:00:00 2001 From: Abram Sanderson Date: Thu, 25 Sep 2025 11:03:27 -0700 Subject: [PATCH 06/15] Update other var names --- .../templates/include-setup-npmrc-for-download.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/pipelines/templates/include-setup-npmrc-for-download.yml b/tools/pipelines/templates/include-setup-npmrc-for-download.yml index 634f1dc97b37..c94f7a5d837b 100644 --- a/tools/pipelines/templates/include-setup-npmrc-for-download.yml +++ b/tools/pipelines/templates/include-setup-npmrc-for-download.yml @@ -42,8 +42,8 @@ steps: script: | set -eu -o pipefail - mkdir -p ${{ parameters.userNpmrcPath }} - cd ${{ parameters.userNpmrcPath }} + mkdir -p ${{ parameters.userNpmrcDirectory }} + cd ${{ parameters.userNpmrcDirectory }} echo "Generating .npmrc" @@ -56,14 +56,14 @@ steps: displayName: 'Authenticate to internal ADO feeds' retryCountOnTaskFailure: 1 inputs: - workingFile: ${{ parameters.userNpmrcPath }}/.npmrc + workingFile: ${{ parameters.userNpmrcDirectory }}/.npmrc - task: Bash@3 displayName: Use the authenticated .npmrc file globally inputs: targetType: 'inline' script: | - TARGET_FILE=${{ parameters.userNpmrcPath }}/.npmrc + TARGET_FILE=${{ parameters.userNpmrcDirectory }}/.npmrc # Configure the copied file to be the default user-level .npmrc file, so all invocations of npm use it. # Particularly relevant for the ones that occur when we install older version for compat tests. From 03ae256785e84176f4426eb66f6a667980d3941e Mon Sep 17 00:00:00 2001 From: Abram Sanderson Date: Thu, 25 Sep 2025 11:43:49 -0700 Subject: [PATCH 07/15] Share devDep copying logic --- .../include-copy-dev-dependencies.yml | 60 +++++++++++++++++++ .../templates/include-test-real-service.yml | 48 ++------------- tools/pipelines/test-perf-benchmarks.yml | 11 ++-- 3 files changed, 68 insertions(+), 51 deletions(-) create mode 100644 tools/pipelines/templates/include-copy-dev-dependencies.yml diff --git a/tools/pipelines/templates/include-copy-dev-dependencies.yml b/tools/pipelines/templates/include-copy-dev-dependencies.yml new file mode 100644 index 000000000000..decad35aa223 --- /dev/null +++ b/tools/pipelines/templates/include-copy-dev-dependencies.yml @@ -0,0 +1,60 @@ +# Copyright (c) Microsoft Corporation and contributors. All rights reserved. +# Licensed under the MIT License. + +# Copy runtime devDependencies from an installed package to somewhere else (usually the root package in the workspace) +# and install them. +# This is useful for test workloads that don't run in the original context of the package (i.e. that need to install it) +# such as the performance benchmarks and e2e test pipelines. + +parameters: +- name: sourcePackageLocation + type: string + +- name: destPackageLocation + type: string + +steps: +# The test workload we are running frequently depends on devDependencies of the package being installed. +# To make sure these are available, copy them to the root package.json and reinstall. +- task: Bash@3 + displayName: Copy devDependencies + inputs: + targetType: 'inline' + script: | + set -eu -o pipefail + + testPkgJsonPath=${{ parameters.sourcePackageLocation }}/package.json + pkgJsonPath=${{ parameters.destPackageLocation }}/package.json + node -e " + const { devDependencies } = require('$testPkgJsonPath'); + const pkg = require('$pkgJsonPath'); + if (!pkg.devDependencies) { + pkg.devDependencies = {}; + } + // Avoid copying some common dev dependencies that should only be required at build time. + // Keeping the dependency tree small helps reduce job time and likelihood of install failures, since + // dependencies added as part of this step won't be reproducible via pnpm-lock. + const avoidCopying = new Set([ + '@types/node', + 'typescript', + '@microsoft/api-extractor', + '@fluid-tools/build-cli', + '@fluidframework/build-common', + '@fluidframework/build-tools' + ]); + for (const [k, v] of Object.entries(devDependencies)) { + if (!pkg.devDependencies[k] && !avoidCopying.has(k)) { + // Note that if you use string interpolation, bash interpreting the dollar sign takes precedence. + console.log('Adding devDependency ' + k + '@' + v); + pkg.devDependencies[k] = v; + } + } + require('fs').writeFileSync('$pkgJsonPath', JSON.stringify(pkg)); + " + +- task: Bash@3 + displayName: 'pnpm install - extra dependencies for test files' + retryCountOnTaskFailure: 10 + inputs: + targetType: 'inline' + script: 'pnpm install --no-frozen-lockfile' diff --git a/tools/pipelines/templates/include-test-real-service.yml b/tools/pipelines/templates/include-test-real-service.yml index b3c6e416e46c..1f9e68d03ba0 100644 --- a/tools/pipelines/templates/include-test-real-service.yml +++ b/tools/pipelines/templates/include-test-real-service.yml @@ -309,50 +309,10 @@ stages: tar --extract --verbose --file $TAR_PATH ./dist/test tar --extract --verbose --file $TAR_PATH ./src/test - # The test workload we are running frequently depends on devDependencies of the package being installed. - # To make sure these are available, copy them to the root package.json and reinstall. - - task: Bash@3 - displayName: Copy devDependencies - inputs: - targetType: 'inline' - script: | - set -eu -o pipefail - - testPkgJsonPath=$(Build.SourcesDirectory)/node_modules/${{ parameters.testPackage }}/package.json - pkgJsonPath=$(Build.SourcesDirectory)/package.json - node -e " - const { devDependencies } = require('$testPkgJsonPath'); - const pkg = require('$pkgJsonPath'); - if (!pkg.devDependencies) { - pkg.devDependencies = {}; - } - // Avoid copying some common dev dependencies that should only be required at build time. - // Keeping the dependency tree small helps reduce job time and likelihood of install failures, since - // dependencies added as part of this step won't be reproducible via pnpm-lock. - const avoidCopying = new Set([ - '@types/node', - 'typescript', - '@microsoft/api-extractor', - '@fluid-tools/build-cli', - '@fluidframework/build-common', - '@fluidframework/build-tools' - ]); - for (const [k, v] of Object.entries(devDependencies)) { - if (!pkg.devDependencies[k] && !avoidCopying.has(k)) { - // Note that if you use string interpolation, bash interpreting the dollar sign takes precedence. - console.log('Adding devDependency ' + k + '@' + v); - pkg.devDependencies[k] = v; - } - } - require('fs').writeFileSync('$pkgJsonPath', JSON.stringify(pkg)); - " - - - task: Bash@3 - displayName: 'pnpm install - extra dependencies for test files' - retryCountOnTaskFailure: 10 - inputs: - targetType: 'inline' - script: 'pnpm install --no-frozen-lockfile' + - template: /tools/pipelines/templates/include-copy-dev-dependencies.yml@self + parameters: + sourcePackageLocation: $(Build.SourcesDirectory)/node_modules/${{ parameters.testPackage }} + destPackageLocation: $(Build.SourcesDirectory) - ${{ if eq(parameters.cacheCompatVersionsInstalls, true) }}: - task: Cache@2 diff --git a/tools/pipelines/test-perf-benchmarks.yml b/tools/pipelines/test-perf-benchmarks.yml index 6df85839ab1b..4dd5ead6aebd 100644 --- a/tools/pipelines/test-perf-benchmarks.yml +++ b/tools/pipelines/test-perf-benchmarks.yml @@ -141,13 +141,10 @@ stages: tar --extract --verbose --file $TAR_PATH ./src/test # Install package dependencies (this gets devDependencies installed so we can then run the package's tests). - - task: Bash@3 - displayName: Install dependencies - ${{ testPackage }} - retryCountOnTaskFailure: 4 - inputs: - workingDirectory: ${{ variables.testWorkspace }}/node_modules/${{ testPackage }} - targetType: 'inline' - script: 'npm install' + - template: /tools/pipelines/templates/include-copy-dev-dependencies.yml@self + parameters: + sourcePackageLocation: ${{ variables.testWorkspace }}/node_modules/${{ testPackage }} + destPackageLocation: $(Build.SourcesDirectory) # Run tests - task: Npm@1 From cc874ac1776e8ba6620933bf1e84ffdb3705ccd6 Mon Sep 17 00:00:00 2001 From: Abram Sanderson Date: Thu, 25 Sep 2025 12:23:41 -0700 Subject: [PATCH 08/15] Use template in other places it should exist --- tools/pipelines/test-perf-benchmarks.yml | 38 ++++++++++-------------- 1 file changed, 15 insertions(+), 23 deletions(-) diff --git a/tools/pipelines/test-perf-benchmarks.yml b/tools/pipelines/test-perf-benchmarks.yml index 4dd5ead6aebd..94e426d1be0b 100644 --- a/tools/pipelines/test-perf-benchmarks.yml +++ b/tools/pipelines/test-perf-benchmarks.yml @@ -250,14 +250,11 @@ stages: tar --extract --verbose --file $TAR_PATH ./dist/test tar --extract --verbose --file $TAR_PATH ./src/test - # Install package dependencies (this gets devDependencies installed so we can then run the package's tests) - - task: Bash@3 - displayName: Install dependencies - ${{ testPackage }} - retryCountOnTaskFailure: 4 - inputs: - workingDirectory: ${{ variables.testWorkspace }}/node_modules/${{ testPackage }} - targetType: 'inline' - script: 'npm install' + # Install package dependencies (this gets devDependencies installed so we can then run the package's tests). + - template: /tools/pipelines/templates/include-copy-dev-dependencies.yml@self + parameters: + sourcePackageLocation: ${{ variables.testWorkspace }}/node_modules/${{ testPackage }} + destPackageLocation: $(Build.SourcesDirectory) # Run tests - task: Npm@1 @@ -362,14 +359,11 @@ stages: tar --extract --verbose --file $TAR_PATH ./dist/test tar --extract --verbose --file $TAR_PATH ./src/test - # Install package dependencies (this gets devDependencies installed so we can then run the package's tests) - - task: Bash@3 - displayName: Install dependencies - ${{ testPackage }} - retryCountOnTaskFailure: 4 - inputs: - workingDirectory: ${{ variables.testWorkspace }}/node_modules/${{ testPackage }} - targetType: 'inline' - script: 'npm install' + # Install package dependencies (this gets devDependencies installed so we can then run the package's tests). + - template: /tools/pipelines/templates/include-copy-dev-dependencies.yml@self + parameters: + sourcePackageLocation: ${{ variables.testWorkspace }}/node_modules/${{ testPackage }} + destPackageLocation: $(Build.SourcesDirectory) - task: Npm@1 displayName: Run custom data performance tests - ${{ testPackage }} @@ -466,13 +460,11 @@ stages: testPackageName: $(testPackage) installPath: $(testWorkspace) - - task: Bash@3 - displayName: Install dependencies - ${{ endpointObject.endpointName }} - retryCountOnTaskFailure: 4 - inputs: - workingDirectory: ${{ variables.testWorkspace }}/node_modules/${{ variables.testPackage }} - targetType: 'inline' - script: 'npm install' + # Install package dependencies (this gets devDependencies installed so we can then run the package's tests). + - template: /tools/pipelines/templates/include-copy-dev-dependencies.yml@self + parameters: + sourcePackageLocation: ${{ variables.testWorkspace }}/node_modules/${{ testPackage }} + destPackageLocation: $(Build.SourcesDirectory) # We run both types of tests in the same bash step so we can make sure to run the second set even if the first # one fails. From b0df230d72bbba27d3be911a17b7672dfc7ea818 Mon Sep 17 00:00:00 2001 From: Abram Sanderson Date: Thu, 25 Sep 2025 12:26:21 -0700 Subject: [PATCH 09/15] Fix syntax for stage without parameterized each --- tools/pipelines/test-perf-benchmarks.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/pipelines/test-perf-benchmarks.yml b/tools/pipelines/test-perf-benchmarks.yml index 94e426d1be0b..dddd99a8749b 100644 --- a/tools/pipelines/test-perf-benchmarks.yml +++ b/tools/pipelines/test-perf-benchmarks.yml @@ -463,7 +463,7 @@ stages: # Install package dependencies (this gets devDependencies installed so we can then run the package's tests). - template: /tools/pipelines/templates/include-copy-dev-dependencies.yml@self parameters: - sourcePackageLocation: ${{ variables.testWorkspace }}/node_modules/${{ testPackage }} + sourcePackageLocation: ${{ variables.testWorkspace }}/node_modules/$(testPackage) destPackageLocation: $(Build.SourcesDirectory) # We run both types of tests in the same bash step so we can make sure to run the second set even if the first From 8da35901cf7818f5bd8240c0a42baed875a31e25 Mon Sep 17 00:00:00 2001 From: Abram Sanderson Date: Thu, 25 Sep 2025 12:46:49 -0700 Subject: [PATCH 10/15] Update mocha configs to use actual module name --- packages/dds/map/src/test/memory/.mocharc.cjs | 2 +- packages/dds/matrix/src/test/memory/.mocharc.cjs | 2 +- packages/dds/matrix/src/test/time/.mocharc.cjs | 2 +- packages/dds/sequence/src/test/memory/.mocharc.cjs | 2 +- .../src/test/benchmark/.mocharc.memory.cjs | 2 +- .../test-end-to-end-tests/src/test/benchmark/.mocharc.time.cjs | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/dds/map/src/test/memory/.mocharc.cjs b/packages/dds/map/src/test/memory/.mocharc.cjs index 6735dcc1ea43..bc28b0f6da23 100644 --- a/packages/dds/map/src/test/memory/.mocharc.cjs +++ b/packages/dds/map/src/test/memory/.mocharc.cjs @@ -14,7 +14,7 @@ module.exports = { "recursive": true, "reporter": "@fluid-tools/benchmark/dist/MochaReporter.js", "reporterOptions": ["reportDir=.memoryTestsOutput/"], - "require": ["node_modules/@fluid-internal/mocha-test-setup"], + "require": ["@fluid-internal/mocha-test-setup"], "spec": ["dist/test/memory/**/*.spec.*js", "--perfMode"], "timeout": "60000", }; diff --git a/packages/dds/matrix/src/test/memory/.mocharc.cjs b/packages/dds/matrix/src/test/memory/.mocharc.cjs index c6834a01044e..6f6e7ad33954 100644 --- a/packages/dds/matrix/src/test/memory/.mocharc.cjs +++ b/packages/dds/matrix/src/test/memory/.mocharc.cjs @@ -14,7 +14,7 @@ module.exports = { "recursive": true, "reporter": "@fluid-tools/benchmark/dist/MochaReporter.js", "reporterOptions": ["reportDir=.memoryTestsOutput/"], - "require": ["node_modules/@fluid-internal/mocha-test-setup"], + "require": ["@fluid-internal/mocha-test-setup"], "spec": ["dist/test/memory/**/*.spec.*js", "--perfMode"], "timeout": "90000", }; diff --git a/packages/dds/matrix/src/test/time/.mocharc.cjs b/packages/dds/matrix/src/test/time/.mocharc.cjs index 2dffc2e71898..de599f4f78af 100644 --- a/packages/dds/matrix/src/test/time/.mocharc.cjs +++ b/packages/dds/matrix/src/test/time/.mocharc.cjs @@ -12,7 +12,7 @@ module.exports = { "node-option": ["expose-gc", "gc-global", "unhandled-rejections=strict"], // without leading "--" "recursive": true, "reporter": "@fluid-tools/benchmark/dist/MochaReporter.js", - "require": ["node_modules/@fluid-internal/mocha-test-setup"], + "require": ["@fluid-internal/mocha-test-setup"], "spec": ["dist/test/time/**/*.spec.*js", "--perfMode"], "timeout": "15000", }; diff --git a/packages/dds/sequence/src/test/memory/.mocharc.cjs b/packages/dds/sequence/src/test/memory/.mocharc.cjs index 6735dcc1ea43..bc28b0f6da23 100644 --- a/packages/dds/sequence/src/test/memory/.mocharc.cjs +++ b/packages/dds/sequence/src/test/memory/.mocharc.cjs @@ -14,7 +14,7 @@ module.exports = { "recursive": true, "reporter": "@fluid-tools/benchmark/dist/MochaReporter.js", "reporterOptions": ["reportDir=.memoryTestsOutput/"], - "require": ["node_modules/@fluid-internal/mocha-test-setup"], + "require": ["@fluid-internal/mocha-test-setup"], "spec": ["dist/test/memory/**/*.spec.*js", "--perfMode"], "timeout": "60000", }; diff --git a/packages/test/test-end-to-end-tests/src/test/benchmark/.mocharc.memory.cjs b/packages/test/test-end-to-end-tests/src/test/benchmark/.mocharc.memory.cjs index 57a7bb3be476..3705e593ef19 100644 --- a/packages/test/test-end-to-end-tests/src/test/benchmark/.mocharc.memory.cjs +++ b/packages/test/test-end-to-end-tests/src/test/benchmark/.mocharc.memory.cjs @@ -18,7 +18,7 @@ const newConfig = { "recursive": true, "reporter": "@fluid-tools/benchmark/dist/MochaReporter.js", "reporterOptions": ["reportDir=.memoryTestsOutput/"], - "require": [...config.require, "node_modules/@fluid-internal/mocha-test-setup"], + "require": [...config.require, "@fluid-internal/mocha-test-setup"], "spec": [ "lib/test/benchmark/**/*.memory.spec.*js", "lib/test/benchmark/**/*.all.spec.*js", diff --git a/packages/test/test-end-to-end-tests/src/test/benchmark/.mocharc.time.cjs b/packages/test/test-end-to-end-tests/src/test/benchmark/.mocharc.time.cjs index cf8481a73c71..9f51ea4740a4 100644 --- a/packages/test/test-end-to-end-tests/src/test/benchmark/.mocharc.time.cjs +++ b/packages/test/test-end-to-end-tests/src/test/benchmark/.mocharc.time.cjs @@ -18,7 +18,7 @@ const newConfig = { "recursive": true, "reporter": "@fluid-tools/benchmark/dist/MochaReporter.js", "reporterOptions": ["reportDir=.timeTestsOutput/"], - "require": [...config.require, "node_modules/@fluid-internal/mocha-test-setup"], + "require": [...config.require, "@fluid-internal/mocha-test-setup"], "spec": [ "lib/test/benchmark/**/*.time.spec.*js", "lib/test/benchmark/**/*.all.spec.*js", From ad108ce5dbdb71e4355241affc62809b607702bb Mon Sep 17 00:00:00 2001 From: Abram Sanderson Date: Thu, 25 Sep 2025 14:20:27 -0700 Subject: [PATCH 11/15] Fix pathToTelemetryGeneratorHandlers --- .../templates/include-vars-telemetry-generator.yml | 4 ++-- tools/pipelines/test-perf-benchmarks.yml | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/pipelines/templates/include-vars-telemetry-generator.yml b/tools/pipelines/templates/include-vars-telemetry-generator.yml index d7c6155e8bc8..765eb02bb2f3 100644 --- a/tools/pipelines/templates/include-vars-telemetry-generator.yml +++ b/tools/pipelines/templates/include-vars-telemetry-generator.yml @@ -14,11 +14,11 @@ variables: # Path where the handlers for telemetry-generator are located. Convenient because every call to the tool needs to # provide this as an absolute path. - name: pathToTelemetryGeneratorHandlers - value: $(pathToTelemetryGenerator)/node_modules/@ff-internal/telemetry-generator/dist/handlers/ + value: $(pathToTelemetryGenerator)/node_modules/@ff-internal/telemetry-generator/dist/handlers readonly: true # Path where the handlers for telemetry-generator are located when using the ff_pipeline_host repository # for shared internal dependencies. - name: pathToTelemetryGeneratorHandlersNew - value: $(Build.SourcesDirectory)/node_modules/@ff-internal/telemetry-generator/dist/handlers/ + value: $(Build.SourcesDirectory)/node_modules/@ff-internal/telemetry-generator/dist/handlers readonly: true diff --git a/tools/pipelines/test-perf-benchmarks.yml b/tools/pipelines/test-perf-benchmarks.yml index dddd99a8749b..cf214aba11ae 100644 --- a/tools/pipelines/test-perf-benchmarks.yml +++ b/tools/pipelines/test-perf-benchmarks.yml @@ -181,7 +181,7 @@ stages: set -eu -o pipefail echo "Write the following benchmark output to Aria/Kusto" ls -laR ${{ variables.consolidatedTestsOutputFolder }}; - pnpm exec telemetry-generator --handlerModule $(pathToTelemetryGeneratorHandlers)/executionTimeTestHandler.js --dir '${{ variables.consolidatedTestsOutputFolder }}'; + pnpm exec telemetry-generator --handlerModule $(pathToTelemetryGeneratorHandlersNew)/executionTimeTestHandler.js --dir '${{ variables.consolidatedTestsOutputFolder }}'; - task: PublishPipelineArtifact@1 displayName: Publish Artifact - Perf tests output - execution time @@ -291,7 +291,7 @@ stages: set -eu -o pipefail echo "Write the following benchmark output to Aria/Kusto"; ls -laR ${{ variables.consolidatedTestsOutputFolder }}; - pnpm exec telemetry-generator --handlerModule $(pathToTelemetryGeneratorHandlers)/memoryUsageTestHandler.js --dir ${{ variables.consolidatedTestsOutputFolder }}; + pnpm exec telemetry-generator --handlerModule $(pathToTelemetryGeneratorHandlersNew)/memoryUsageTestHandler.js --dir ${{ variables.consolidatedTestsOutputFolder }}; - task: PublishPipelineArtifact@1 displayName: Publish Artifact - Perf tests output - memory usage @@ -399,7 +399,7 @@ stages: set -eu -o pipefail echo "Write the following benchmark output to Aria/Kusto"; ls -laR ${{ variables.consolidatedTestsOutputFolder }}; - pnpm exec telemetry-generator --handlerModule $(pathToTelemetryGeneratorHandlers)/customBenchmarkHandler.js --dir ${{ variables.consolidatedTestsOutputFolder }}; + pnpm exec telemetry-generator --handlerModule $(pathToTelemetryGeneratorHandlersNew)/customBenchmarkHandler.js --dir ${{ variables.consolidatedTestsOutputFolder }}; - task: PublishPipelineArtifact@1 displayName: Publish Artifact - Perf tests output - custom data usage @@ -533,7 +533,7 @@ stages: set -eu -o pipefail echo "Writing the following performance tests results to Aria/Kusto - ${{ endpointObject.endpointName }}" ls -la ${{ variables.executionTimeTestOutputFolder }}; - pnpm exec telemetry-generator --handlerModule $(pathToTelemetryGeneratorHandlers)/executionTimeTestHandler.js --dir ${{ variables.executionTimeTestOutputFolder }}; + pnpm exec telemetry-generator --handlerModule $(pathToTelemetryGeneratorHandlersNew)/executionTimeTestHandler.js --dir ${{ variables.executionTimeTestOutputFolder }}; env: FLUID_ENDPOINTNAME: ${{ endpointObject.endpointName }} @@ -546,7 +546,7 @@ stages: set -eu -o pipefail echo "Writing the following performance tests results to Aria/Kusto - ${{ endpointObject.endpointName }}" ls -la ${{ variables.memoryUsageTestOutputFolder }}; - pnpm exec telemetry-generator --handlerModule $(pathToTelemetryGeneratorHandlers)/memoryUsageTestHandler.js --dir ${{ variables.memoryUsageTestOutputFolder }}; + pnpm exec telemetry-generator --handlerModule $(pathToTelemetryGeneratorHandlersNew)/memoryUsageTestHandler.js --dir ${{ variables.memoryUsageTestOutputFolder }}; env: FLUID_ENDPOINTNAME: ${{ endpointObject.endpointName }} From a20eae380909476fe3a048180c39974c329b5fb9 Mon Sep 17 00:00:00 2001 From: Abram Sanderson Date: Thu, 25 Sep 2025 16:27:06 -0700 Subject: [PATCH 12/15] Update one more path and compute benchmark output location using node require --- tools/pipelines/test-perf-benchmarks.yml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/tools/pipelines/test-perf-benchmarks.yml b/tools/pipelines/test-perf-benchmarks.yml index cf214aba11ae..554830d56d1f 100644 --- a/tools/pipelines/test-perf-benchmarks.yml +++ b/tools/pipelines/test-perf-benchmarks.yml @@ -154,11 +154,25 @@ stages: workingDir: ${{ variables.testWorkspace }}/node_modules/${{ testPackage }} customCommand: 'run test:benchmark:report' + - task: Bash@3 + displayName: Compute benchmark output folder - ${{ testPackage }} + inputs: + targetType: 'inline' + workingDirectory: ${{ variables.testWorkspace }}/node_modules/${{ testPackage }} + script: | + set -eu -o pipefail + node --input-type=module -e " + const benchmarkIndexPath = await import.meta.resolve('@fluid-tools/benchmark'); + const absolutePath = benchmarkIndexPath.replace('index.js', '.output'); + console.log('Resolved @fluid-tools/benchmark output folder to ' + absolutePath); + console.log('##vso[task.setvariable variable=benchmarkOutputFolder]' + absolutePath); + " + # Consolidate output files - task: CopyFiles@2 displayName: Consolidate output files - ${{ testPackage }} inputs: - sourceFolder: ${{ variables.testWorkspace }}/node_modules/${{ testPackage }}/node_modules/@fluid-tools/benchmark/dist/.output/ + sourceFolder: $(benchmarkOutputFolder) contents: '**' targetFolder: ${{ variables.consolidatedTestsOutputFolder }}/${{ testPackage }} @@ -569,7 +583,7 @@ stages: displayName: Remove Output Folders from local server run ${{ endpointObject.endpointName }} inputs: targetType: 'inline' - workingDirectory: $(pathToTelemetryGenerator) + workingDirectory: $(pathToTelemetryGeneratorNew) script: | set -eu -o pipefail ls -laR ${{ variables.executionTimeTestOutputFolder }}; From e935146d001ba6b445a0562f880c6f090dda3f41 Mon Sep 17 00:00:00 2001 From: Abram Sanderson Date: Thu, 25 Sep 2025 16:56:16 -0700 Subject: [PATCH 13/15] define variable --- .../templates/include-vars-telemetry-generator.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/pipelines/templates/include-vars-telemetry-generator.yml b/tools/pipelines/templates/include-vars-telemetry-generator.yml index 765eb02bb2f3..d67e2c877275 100644 --- a/tools/pipelines/templates/include-vars-telemetry-generator.yml +++ b/tools/pipelines/templates/include-vars-telemetry-generator.yml @@ -11,14 +11,19 @@ variables: - name: pathToTelemetryGenerator value: $(Agent.TempDirectory)/telemetry-generator readonly: true + # Path where the handlers for telemetry-generator are located. Convenient because every call to the tool needs to # provide this as an absolute path. - name: pathToTelemetryGeneratorHandlers value: $(pathToTelemetryGenerator)/node_modules/@ff-internal/telemetry-generator/dist/handlers readonly: true -# Path where the handlers for telemetry-generator are located when using the ff_pipeline_host repository +# Same semantics as above two variables, but for pipelines that use the new ff_pipeline_host repository setup # for shared internal dependencies. +- name: pathToTelemetryGeneratorNew + value: $(Build.SourcesDirectory)/node_modules/telemetry-generator + readonly: true + - name: pathToTelemetryGeneratorHandlersNew value: $(Build.SourcesDirectory)/node_modules/@ff-internal/telemetry-generator/dist/handlers readonly: true From 6c03a475f3a54121f6bf95b3fef72ca687a7adc8 Mon Sep 17 00:00:00 2001 From: Abram Sanderson Date: Thu, 25 Sep 2025 18:14:31 -0700 Subject: [PATCH 14/15] include scope --- tools/pipelines/templates/include-vars-telemetry-generator.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/pipelines/templates/include-vars-telemetry-generator.yml b/tools/pipelines/templates/include-vars-telemetry-generator.yml index d67e2c877275..beda17245e7c 100644 --- a/tools/pipelines/templates/include-vars-telemetry-generator.yml +++ b/tools/pipelines/templates/include-vars-telemetry-generator.yml @@ -21,7 +21,7 @@ variables: # Same semantics as above two variables, but for pipelines that use the new ff_pipeline_host repository setup # for shared internal dependencies. - name: pathToTelemetryGeneratorNew - value: $(Build.SourcesDirectory)/node_modules/telemetry-generator + value: $(Build.SourcesDirectory)/node_modules/@ff-internal/telemetry-generator readonly: true - name: pathToTelemetryGeneratorHandlersNew From db2373d78c12f22086c7efef9ed2f1ff2a9718fe Mon Sep 17 00:00:00 2001 From: Abram Sanderson Date: Fri, 26 Sep 2025 09:16:51 -0700 Subject: [PATCH 15/15] import.meta.resolve outputs a url, not a path --- tools/pipelines/test-perf-benchmarks.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/pipelines/test-perf-benchmarks.yml b/tools/pipelines/test-perf-benchmarks.yml index 554830d56d1f..bc48aa19a7c0 100644 --- a/tools/pipelines/test-perf-benchmarks.yml +++ b/tools/pipelines/test-perf-benchmarks.yml @@ -162,8 +162,8 @@ stages: script: | set -eu -o pipefail node --input-type=module -e " - const benchmarkIndexPath = await import.meta.resolve('@fluid-tools/benchmark'); - const absolutePath = benchmarkIndexPath.replace('index.js', '.output'); + const benchmarkIndexUrl = await import.meta.resolve('@fluid-tools/benchmark'); + const absolutePath = new URL(benchmarkIndexUrl.replace('index.js', '.output')).pathname; console.log('Resolved @fluid-tools/benchmark output folder to ' + absolutePath); console.log('##vso[task.setvariable variable=benchmarkOutputFolder]' + absolutePath); "