Skip to content

Commit 81bce37

Browse files
authored
Merge branch 'main' into copilot/update-spring-boot-version-again
2 parents 20cff88 + 7a1fa56 commit 81bce37

File tree

686 files changed

+14950
-44847
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

686 files changed

+14950
-44847
lines changed

.github/CODEOWNERS

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,13 @@
8383
# ServiceOwners: @mojayara @Prasanna-Padmanabhan
8484

8585
# PRLabel: %AI
86-
/sdk/ai/ @dargilco @jhakulin @jpalvarezl @Azure/azure-java-sdk
86+
/sdk/ai/ @dargilco @trrwilson @jpalvarezl @Azure/azure-java-sdk
8787

8888
# PRLabel: %AI Agents
89-
/sdk/ai/azure-ai-agents-persistent/ @dargilco @jhakulin @jayantjha @Azure/azure-java-sdk
89+
/sdk/ai/azure-ai-agents-persistent/ @dargilco @trrwilson @jayantjha @Azure/azure-java-sdk
9090

9191
# PRLabel: %AI Model Inference
92-
/sdk/ai/azure-ai-inference/ @dargilco @jhakulin @glharper @Azure/azure-java-sdk
92+
/sdk/ai/azure-ai-inference/ @dargilco @trrwilson @glharper @Azure/azure-java-sdk
9393

9494
# PRLabel: %Voice Live
9595
/sdk/ai/azure-ai-voicelive/ @rhurey @xitzhang @amber-yujueWang

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/pipelines/templates/steps/verify-changelogs.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,17 @@ parameters:
44
- name: Condition
55
type: string
66
default: succeeded()
7+
- name: ForRelease
8+
type: boolean
9+
default: false
710

811
steps:
912
- task: Powershell@2
1013
inputs:
1114
filePath: $(Build.SourcesDirectory)/eng/common/scripts/Verify-ChangeLogs.ps1
1215
arguments: >
1316
-PackagePropertiesFolder '${{ parameters.PackagePropertiesFolder }}'
17+
-ForRelease $${{ parameters.ForRelease }}
1418
pwsh: true
1519
displayName: Verify ChangeLogEntries
1620
condition: ${{ parameters.Condition }}

eng/common/scripts/Helpers/DevOps-WorkItem-Helpers.ps1

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,7 @@ function FindPackageWorkItem($lang, $packageName, $version, $outputCommand = $tr
268268
$fields += "Custom.Generated"
269269
$fields += "Custom.RoadmapState"
270270
$fields += "Microsoft.VSTS.Common.StateChangeDate"
271+
$fields += "Custom.SpecProjectPath"
271272

272273
$fieldList = ($fields | ForEach-Object { "[$_]"}) -join ", "
273274
$query = "SELECT ${fieldList} FROM WorkItems WHERE [Work Item Type] = 'Package'"
@@ -1256,7 +1257,8 @@ function Update-DevOpsReleaseWorkItem {
12561257
[string]$packageNewLibrary = "true",
12571258
[string]$relatedWorkItemId = $null,
12581259
[string]$tag = $null,
1259-
[bool]$inRelease = $true
1260+
[bool]$inRelease = $true,
1261+
[string]$specProjectPath = ""
12601262
)
12611263

12621264
if (!(Get-Command az -ErrorAction SilentlyContinue)) {
@@ -1280,6 +1282,7 @@ function Update-DevOpsReleaseWorkItem {
12801282
RepoPath = $packageRepoPath
12811283
Type = $packageType
12821284
New = $packageNewLibrary
1285+
SpecProjectPath = $specProjectPath
12831286
};
12841287

12851288
if (!$plannedDate) {
@@ -1326,6 +1329,16 @@ function Update-DevOpsReleaseWorkItem {
13261329
}
13271330
$updatedWI = UpdatePackageVersions $workItem -plannedVersions $plannedVersions
13281331

1332+
if ((!$workItem.fields.ContainsKey('Custom.SpecProjectPath') -and $packageInfo.SpecProjectPath) -or
1333+
($workItem.fields.ContainsKey('Custom.SpecProjectPath') -and ($workItem.fields['Custom.SpecProjectPath'] -ne $packageInfo.SpecProjectPath))
1334+
) {
1335+
Write-Host "Updating SpecProjectPath to '$($packageInfo.SpecProjectPath)' for work item [$($workItem.id)]"
1336+
UpdateWorkItem `
1337+
-id $workItem.id `
1338+
-fields "`"Custom.SpecProjectPath=$($packageInfo.SpecProjectPath)`"" `
1339+
-outputCommand $false
1340+
}
1341+
13291342
Write-Host "Release tracking item is at https://dev.azure.com/azure-sdk/Release/_workitems/edit/$($updatedWI.id)/"
13301343
return $true
13311344
}

eng/common/scripts/Package-Properties.ps1

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ class PackageProps {
2222
[HashTable]$ArtifactDetails
2323
[HashTable]$CIParameters
2424

25+
# Path from root of azure-rest-api-specs repo to spec project (read from
26+
# tsp-location.yaml if it exists in the package directory)
27+
[string]$SpecProjectPath
28+
2529
PackageProps([string]$name, [string]$version, [string]$directoryPath, [string]$serviceDirectory) {
2630
$this.Initialize($name, $version, $directoryPath, $serviceDirectory)
2731
}
@@ -61,6 +65,13 @@ class PackageProps {
6165
$this.ChangeLogPath = $null
6266
}
6367

68+
if (Test-Path (Join-Path $directoryPath 'tsp-location.yaml')) {
69+
$tspLocation = LoadFrom-Yaml (Join-Path $directoryPath 'tsp-location.yaml')
70+
if ($tspLocation -and $tspLocation.directory) {
71+
$this.SpecProjectPath = $tspLocation.directory
72+
}
73+
}
74+
6475
$this.CIParameters = @{"CIMatrixConfigs" = @()}
6576
$this.InitializeCIArtifacts()
6677
}

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

Lines changed: 40 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)
@@ -144,6 +181,7 @@ foreach ($pkg in $allPackageProperties)
144181
if (-not [System.String]::IsNullOrEmpty($pkg.Group)) {
145182
Write-Host "GroupId: $($pkg.Group)"
146183
}
184+
Write-Host "Spec Project Path: $($pkg.SpecProjectPath)"
147185
Write-Host "Release date: $($pkg.ReleaseStatus)"
148186
$configFilePrefix = $pkg.Name
149187

0 commit comments

Comments
 (0)