Skip to content

Coldstart pipeline enhancements #11102

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 4, 2025
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
11 changes: 8 additions & 3 deletions eng/ci/host.coldstart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ resources:
variables:
- template: /eng/ci/templates/variables/coldstart.yml@self
- template: /ci/variables/cfs.yml@eng
- name: shouldCollectPerfViewProfileOnWindows
${{ if eq(variables['Build.Reason'], 'Schedule') }}: # We always collect PerfView profile on nightly runs.
value: true
${{ if ne(variables['Build.Reason'], 'Schedule') }}:
value: ${{ parameters.collectPerfViewProfileOnWindows }}

extends:
template: v1/1ES.Unofficial.PipelineTemplate.yml@1es
Expand All @@ -85,7 +90,7 @@ extends:
description: .NET9 Web Application
functionAppName: HelloHttpNet9
instanceId: ${{ appId }}
collectPerfViewProfileOnWindows: ${{ parameters.collectPerfViewProfileOnWindows }}
collectPerfViewProfileOnWindows: ${{ variables.shouldCollectPerfViewProfileOnWindows }}
perfViewCollectArguments: ${{ parameters.perfViewCollectArguments }}
netTraceCollectArguments: ${{ parameters.netTraceCollectArguments }}
collectNetTrace: ${{ parameters.collectNetTrace }}
Expand All @@ -96,7 +101,7 @@ extends:
description: .NET9 Worker Application
functionAppName: HelloHttpNet9NoProxy
instanceId: ${{ appId }}
collectPerfViewProfileOnWindows: ${{ parameters.collectPerfViewProfileOnWindows }}
collectPerfViewProfileOnWindows: ${{ variables.shouldCollectPerfViewProfileOnWindows }}
perfViewCollectArguments: ${{ parameters.perfViewCollectArguments }}
netTraceCollectArguments: ${{ parameters.netTraceCollectArguments }}
collectNetTrace: ${{ parameters.collectNetTrace }}
Expand All @@ -107,7 +112,7 @@ extends:
description: Node Application
functionAppName: HelloHttpNode
instanceId: ${{ appId }}
collectPerfViewProfileOnWindows: ${{ parameters.collectPerfViewProfileOnWindows }}
collectPerfViewProfileOnWindows: ${{ variables.shouldCollectPerfViewProfileOnWindows }}
perfViewCollectArguments: ${{ parameters.perfViewCollectArguments }}
netTraceCollectArguments: ${{ parameters.netTraceCollectArguments }}
collectNetTrace: ${{ parameters.collectNetTrace }}
Expand Down
21 changes: 10 additions & 11 deletions eng/ci/templates/official/jobs/run-coldstart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ jobs:
variables:
functionAppOutputPath: $(Build.BinariesDirectory)/Published/${{ parameters.functionAppName }}
hostOutputPath: $(Build.BinariesDirectory)/Published/HostRuntime
hostAssemblyPath: $(hostOutputPath)/Microsoft.Azure.WebJobs.Script.WebHost.dll
logsDirectory: $(Build.ArtifactStagingDirectory)/Logs
stdOutLogsFilePath: $(logsDirectory)/std_out_logs.txt
stdErrorLogsFilePath: $(logsDirectory)/std_error_logs.txt
Expand All @@ -66,8 +65,7 @@ jobs:
traceFileZipName: $(traceFileName).zip
traceFilePath: $(traceDirectory)/$(traceFileName)
traceZipFilePath: $(traceDirectory)/$(traceFileZipName)
traceAnalysisResultsDirectory: $(netTraceDirectory)/results
traceAnalysisResultMarkdownFilePath: $(traceAnalysisResultsDirectory)/$(traceFileNameWithoutExtension).md
traceAnalysisResultMarkdownFilePath: $(traceDirectory)/results/$(traceFileNameWithoutExtension).md
traceLogPath: $(logsDirectory)/logs.log
${{ if eq(parameters.os, 'Linux') }}:
publishRid: linux-x64
Expand Down Expand Up @@ -112,12 +110,8 @@ jobs:

- template: /eng/ci/templates/install-dotnet.yml@self

- task: UseDotNet@2
displayName: Install .NET 10
inputs:
packageType: sdk
version: 10.x
includePreviewVersions: true
- script: dotnet --info
displayName: "Print .NET Environment Info"

- ${{ if eq(parameters.functionAppName, 'HelloHttpNode') }}:
- task: CopyFiles@2
Expand Down Expand Up @@ -216,7 +210,6 @@ jobs:

- ${{ if and(eq(parameters.collectPerfViewProfileOnWindows, true), eq(parameters.instanceId, '1')) }}: # collect profile only on the first instance
- pwsh: |
New-Item -ItemType Directory -Path $(traceDirectory)
if (Test-Path $(perfViewPath)) {
$collectArguments = ${env:COLLECT_ARGUMENTS}
Write-Host "PerfView.exe found. Executing with arguments '$collectArguments'"
Expand Down Expand Up @@ -280,8 +273,14 @@ jobs:
$attempt = 0

while ($attempt -lt $maxAttempts) {
$files = Get-ChildItem -Path $(traceDirectory)
$files = Get-ChildItem -Path $(traceDirectory) -File
$fileCount = $files.Count

Write-Host "Found $fileCount file(s) in $(traceDirectory):"
foreach ($file in $files) {
Write-Host " - $($file.Name)"
}

if ($fileCount -eq 1 -and $files[0].Name -eq '$(traceFileZipName)') {
break
} else {
Expand Down
2 changes: 1 addition & 1 deletion eng/ci/templates/variables/coldstart.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
variables:
# This controls how many cold start samples are collected for each app+OS combination.
- name: runInstances
value: "1,2,3,4,5,6,7,8,9,10"
value: "1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20"
1 change: 1 addition & 0 deletions release_notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@
- Avoid setting up OTel and AzMon exporter in the placeholder mode. (#11090)
- Update Java Worker Version to [2.19.1](https://github.com/Azure/azure-functions-java-worker/releases/tag/2.19.1)
- Memory allocation optimizations in `FeatureFlags.IsEnabled` by adopting zero-allocation `ContainsToken` for efficient delimited token search (#11075)
- Improvements to coldstart pipeline (#11102).