Skip to content

Commit ae53c9e

Browse files
Merge remote-tracking branch 'upstream/main' into wangamber/transcription
2 parents 7182118 + 38e062e commit ae53c9e

File tree

31 files changed

+644
-552
lines changed

31 files changed

+644
-552
lines changed

eng/automation/parameters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
SDK_ROOT = "../../" # related to file dir
1919
AUTOREST_CORE_VERSION = "3.9.7"
20-
AUTOREST_JAVA = "@autorest/[email protected].60"
20+
AUTOREST_JAVA = "@autorest/[email protected].62"
2121
DEFAULT_VERSION = "1.0.0-beta.1"
2222
GROUP_ID = "com.azure.resourcemanager"
2323
API_SPECS_FILE = "api-specs.yaml"

eng/common/pipelines/ai-evals-tests.yml

Lines changed: 24 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -15,83 +15,34 @@ parameters:
1515
default: 'tools/azsdk-cli/Azure.Sdk.Tools.Cli.Evaluations'
1616
- name: OpenAIEndPoint
1717
type: string
18-
default: 'https://ai-prmarottai3149546654251245.openai.azure.com/'
18+
default: 'https://openai-shared.openai.azure.com/'
1919
- name: Model
2020
type: string
2121
default: 'gpt-5'
22-
- name: ToolsRepoName
22+
- name: EvalRepoOwner
23+
type: string
24+
default: 'Azure'
25+
- name: EvalRepoName
2326
type: string
2427
default: 'azure-sdk-tools'
25-
- name: ToolsRepoOwner
28+
- name: EvalRepoCommit
2629
type: string
27-
default: 'Azure'
28-
29-
jobs:
30-
- job: Run_Eval
31-
variables:
32-
- template: /eng/pipelines/templates/variables/globals.yml
33-
- template: /eng/pipelines/templates/variables/image.yml
34-
displayName: 'Run AI Eval'
35-
pool:
36-
name: $(LINUXPOOL)
37-
image: $(LINUXVMIMAGE)
38-
os: linux
39-
40-
steps:
41-
- task: UseDotNet@2
42-
displayName: "Use .NET SDK 9.0.x"
43-
retryCountOnTaskFailure: 3
44-
inputs:
45-
packageType: sdk
46-
version: 9.0.x
47-
performMultiLevelLookup: true
48-
49-
- task: UseDotNet@2
50-
displayName: "Use .NET SDK 8.0.x"
51-
retryCountOnTaskFailure: 3
52-
inputs:
53-
packageType: sdk
54-
version: 8.0.x
55-
performMultiLevelLookup: true
56-
57-
- template: /eng/common/pipelines/templates/steps/sparse-checkout.yml
58-
parameters:
59-
SkipCheckoutNone: true
60-
Repositories:
61-
- Name: $(Build.Repository.Name)
62-
Commitish: $(Build.SourceVersion)
63-
WorkingDirectory: $(System.DefaultWorkingDirectory)/$(Build.Repository.Name)
64-
- Name: ${{ parameters.ToolsRepoOwner }}/${{ parameters.ToolsRepoName }}
65-
WorkingDirectory: $(System.DefaultWorkingDirectory)/${{ parameters.ToolsRepoName }}
66-
Paths:
67-
- 'tools/**'
68-
- eng/common/**
69-
- .github/copilot-instructions.md
70-
71-
- task: AzureCLI@2
72-
displayName: 'Run eval'
73-
inputs:
74-
azureSubscription: opensource-api-connection
75-
scriptType: 'bash'
76-
scriptLocation: 'inlineScript'
77-
workingDirectory: '${{ parameters.ToolsRepoName }}/${{ parameters.EvalProject }}'
78-
inlineScript: |
79-
echo "Logged in to Azure"
80-
echo "Running eval in project ${{ parameters.ToolsRepoName }}/${{ parameters.EvalProject }}"
81-
dotnet test /p:ArtifactsPackagesDir=$(Build.ArtifactStagingDirectory) --logger trx
82-
env:
83-
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
84-
DOTNET_CLI_TELEMETRY_OPTOUT: 1
85-
DOTNET_MULTILEVEL_LOOKUP: 0
86-
AZURE_OPENAI_MODEL_DEPLOYMENT_NAME: ${{ parameters.Model }}
87-
AZURE_OPENAI_ENDPOINT: ${{ parameters.OpenAIEndPoint }}
88-
REPOSITORY_NAME: $(Build.Repository.Name)
89-
COPILOT_INSTRUCTIONS_PATH_MCP_EVALS: $(System.DefaultWorkingDirectory)/$(Build.Repository.Name)/.github/copilot-instructions.md
30+
default: 'main'
9031

91-
- task: PublishTestResults@2
92-
condition: succeededOrFailed()
93-
inputs:
94-
testResultsFiles: '**/*.trx'
95-
testRunTitle: $(System.JobDisplayName)
96-
testResultsFormat: 'VSTest'
97-
mergeTestResults: true
32+
variables:
33+
TargetRepoOwner: ${{ split(variables['Build.Repository.Name'], '/')[0] }}
34+
TargetRepoName: ${{ split(variables['Build.Repository.Name'], '/')[1] }}
35+
TargetRepoCommit: ${{ variables['Build.SourceVersion'] }}
36+
37+
extends:
38+
template: /eng/common/pipelines/templates/jobs/ai-eval-job.yml
39+
parameters:
40+
EvalProject: ${{ parameters.EvalProject }}
41+
OpenAIEndPoint: ${{ parameters.OpenAIEndPoint }}
42+
Model: ${{ parameters.Model }}
43+
EvalRepoOwner: ${{ parameters.EvalRepoOwner }}
44+
EvalRepoName: ${{ parameters.EvalRepoName }}
45+
EvalRepoCommit: ${{ parameters.EvalRepoCommit }}
46+
TargetRepoOwner: $(TargetRepoOwner)
47+
TargetRepoName: $(TargetRepoName)
48+
TargetRepoCommit: $(TargetRepoCommit)
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
parameters:
2+
- name: EvalProject
3+
type: string
4+
default: 'tools/azsdk-cli/Azure.Sdk.Tools.Cli.Evaluations'
5+
- name: OpenAIEndPoint
6+
type: string
7+
default: 'https://openai-shared.openai.azure.com/'
8+
- name: Model
9+
type: string
10+
default: 'gpt-5'
11+
# Repository where evals are located
12+
- name: EvalRepoOwner
13+
type: string
14+
default: 'Azure'
15+
- name: EvalRepoName
16+
type: string
17+
default: 'azure-sdk-tools'
18+
- name: EvalRepoCommit
19+
type: string
20+
default: 'main'
21+
# Target repository for copilot instructions
22+
- name: TargetRepoOwner
23+
type: string
24+
- name: TargetRepoName
25+
type: string
26+
- name: TargetRepoCommit
27+
type: string
28+
29+
jobs:
30+
- job: Run_Eval
31+
variables:
32+
- template: /eng/pipelines/templates/variables/globals.yml
33+
- template: /eng/pipelines/templates/variables/image.yml
34+
displayName: 'Run AI Eval'
35+
pool:
36+
name: $(LINUXPOOL)
37+
image: $(LINUXVMIMAGE)
38+
os: linux
39+
40+
steps:
41+
- checkout: none
42+
- task: UseDotNet@2
43+
displayName: "Use .NET SDK 9.0.x"
44+
retryCountOnTaskFailure: 3
45+
inputs:
46+
packageType: sdk
47+
version: 9.0.x
48+
performMultiLevelLookup: true
49+
50+
- task: UseDotNet@2
51+
displayName: "Use .NET SDK 8.0.x"
52+
retryCountOnTaskFailure: 3
53+
inputs:
54+
packageType: sdk
55+
version: 8.0.x
56+
performMultiLevelLookup: true
57+
58+
- template: /eng/common/pipelines/templates/steps/sparse-checkout.yml
59+
parameters:
60+
SkipCheckoutNone: true
61+
Repositories:
62+
- Name: ${{ parameters.EvalRepoOwner }}/${{ parameters.EvalRepoName }}
63+
Commitish: ${{ parameters.EvalRepoCommit }}
64+
WorkingDirectory: $(System.DefaultWorkingDirectory)/${{ parameters.EvalRepoName }}
65+
- Name: ${{ parameters.TargetRepoOwner }}/${{ parameters.TargetRepoName }}
66+
Commitish: ${{ parameters.TargetRepoCommit }}
67+
WorkingDirectory: $(System.DefaultWorkingDirectory)/${{ parameters.TargetRepoName }}
68+
Paths:
69+
- 'tools/**'
70+
- 'eng/common/**'
71+
- '.github/copilot-instructions.md'
72+
73+
- task: AzureCLI@2
74+
displayName: 'Run eval'
75+
condition: and(succeeded(), ne(variables['Skip.Eval'], 'true'))
76+
inputs:
77+
azureSubscription: opensource-api-connection
78+
scriptType: 'bash'
79+
scriptLocation: 'inlineScript'
80+
workingDirectory: '$(System.DefaultWorkingDirectory)/${{ parameters.EvalRepoName }}/${{ parameters.EvalProject }}'
81+
inlineScript: |
82+
echo "Logged in to Azure"
83+
echo "Running eval"
84+
dotnet test --logger trx
85+
env:
86+
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
87+
DOTNET_CLI_TELEMETRY_OPTOUT: 1
88+
DOTNET_MULTILEVEL_LOOKUP: 0
89+
AZURE_OPENAI_MODEL_DEPLOYMENT_NAME: ${{ parameters.Model }}
90+
AZURE_OPENAI_ENDPOINT: ${{ parameters.OpenAIEndPoint }}
91+
REPOSITORY_NAME: ${{ parameters.TargetRepoName }}
92+
COPILOT_INSTRUCTIONS_PATH_MCP_EVALS: $(System.DefaultWorkingDirectory)/${{ parameters.TargetRepoName }}/.github/copilot-instructions.md
93+
94+
- task: PublishTestResults@2
95+
condition: succeededOrFailed()
96+
inputs:
97+
testResultsFiles: '**/*.trx'
98+
testRunTitle: $(System.JobDisplayName)
99+
testResultsFormat: 'VSTest'
100+
mergeTestResults: true

eng/common/pipelines/templates/steps/daily-dev-build-variable.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# is used when this pipeline is going to be generating and publishing daily dev builds.
33
parameters:
44
ServiceDirectory: ''
5+
Artifacts: []
56
Condition: succeeded()
67
steps:
78
- ${{if ne(parameters.ServiceDirectory, '')}}:
@@ -11,6 +12,7 @@ steps:
1112
arguments: >
1213
-ServiceDirectory ${{parameters.ServiceDirectory}}
1314
-OutDirectory $(Build.ArtifactStagingDirectory)/PackageInfo
15+
-artifactList @('${{ replace(convertToJson(parameters.Artifacts), '''', '`''') }}' | ConvertFrom-Json | Select-Object -ExpandProperty name)
1416
pwsh: true
1517
workingDirectory: $(Pipeline.Workspace)
1618
displayName: Dump Package properties

eng/common/scripts/Save-Package-Properties.ps1

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,11 @@ package properties JSON file. If the package properties JSON file already
3030
exists, read the Version property from the existing package properties JSON file
3131
and set that as the Version property for the new output. This has the effect of
3232
"adding" a DevVersion property to the file which could be different from the
33-
Verison property in that file.
33+
Version property in that file.
34+
35+
.PARAMETER artifactList
36+
Optional array of artifact names to filter the package properties. Only packages
37+
with artifact names matching entries in this list will be processed.
3438
#>
3539

3640
[CmdletBinding()]
@@ -39,7 +43,8 @@ Param (
3943
[Parameter(Mandatory = $True)]
4044
[string] $outDirectory,
4145
[string] $prDiff,
42-
[switch] $addDevVersion
46+
[switch] $addDevVersion,
47+
[array] $artifactList
4348
)
4449

4550
. (Join-Path $PSScriptRoot common.ps1)
@@ -132,6 +137,38 @@ if (-not (Test-Path -Path $outDirectory))
132137
New-Item -ItemType Directory -Force -Path $outDirectory | Out-Null
133138
}
134139

140+
if ($artifactList)
141+
{
142+
# Filter out null, empty, or whitespace-only entries
143+
$filteredArtifacts = @($artifactList | Where-Object { -not [string]::IsNullOrWhiteSpace($_) })
144+
145+
if ($filteredArtifacts.Count -eq 0)
146+
{
147+
Write-Warning "Artifact list contains no valid entries"
148+
}
149+
else
150+
{
151+
Write-Host "Filtering package properties to match artifact list: $($filteredArtifacts -join ', ')"
152+
$artifactSet = New-Object 'System.Collections.Generic.HashSet[string]' ([System.StringComparer]::OrdinalIgnoreCase)
153+
foreach ($artifact in $filteredArtifacts) {
154+
$artifactSet.Add($artifact) | Out-Null
155+
}
156+
157+
# Warn about packages missing ArtifactName property
158+
$missingArtifactName = $allPackageProperties | Where-Object { $_.PSObject.Properties.Name -notcontains 'ArtifactName' }
159+
foreach ($pkg in $missingArtifactName) {
160+
Write-Warning "Package '$($pkg.PackageName)' does not have an 'ArtifactName' property and will be excluded from artifact filtering."
161+
}
162+
$allPackageProperties = $allPackageProperties | Where-Object { $_.ArtifactName -and $artifactSet.Contains($_.ArtifactName) }
163+
164+
if (!$allPackageProperties)
165+
{
166+
Write-Error "No packages found matching the provided artifact list"
167+
exit 1
168+
}
169+
}
170+
}
171+
135172
foreach ($pkg in $allPackageProperties)
136173
{
137174
if ($pkg.Name)

eng/common/scripts/stress-testing/find-all-stress-packages.ps1

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,10 @@ function FindStressPackages(
3131
$filters['stressTest'] = 'true'
3232
$packages = @()
3333
$chartFiles = Get-ChildItem -Recurse -Filter 'Chart.yaml' $directory
34-
Write-Host "Found chart files:"
35-
Write-Host ($chartFiles -join "`n")
34+
if ($chartFiles) {
35+
Write-Host "Found chart files:"
36+
Write-Host ($chartFiles -join "`n")
37+
}
3638

3739
if (!$MatrixFileName) {
3840
$MatrixFileName = 'scenarios-matrix.yaml'

eng/common/scripts/stress-testing/stress-test-deployment-lib.ps1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,10 @@ function DeployStressTests(
172172
-MatrixFilters $MatrixFilters `
173173
-MatrixReplace $MatrixReplace `
174174
-MatrixNonSparseParameters $MatrixNonSparseParameters)
175+
if (!$pkgs -or !$pkgs.Length) {
176+
Write-Warning "No stress test packages found in $searchDirectory"
177+
exit 0
178+
}
175179
Write-Host "" "Found $($pkgs.Length) stress test packages:"
176180
Write-Host $pkgs.Directory ""
177181
foreach ($pkg in $pkgs) {

0 commit comments

Comments
 (0)