Skip to content

Commit eed901d

Browse files
committed
merging in 101 base branch
2 parents 29f8b11 + e0ac8b9 commit eed901d

File tree

417 files changed

+13644
-4894
lines changed

Some content is hidden

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

417 files changed

+13644
-4894
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/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/ChangeLog-Operations.ps1

Lines changed: 143 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,15 @@ $CHANGELOG_UNRELEASED_STATUS = "(Unreleased)"
88
$CHANGELOG_DATE_FORMAT = "yyyy-MM-dd"
99
$RecommendedSectionHeaders = @("Features Added", "Breaking Changes", "Bugs Fixed", "Other Changes")
1010

11+
# Helper function to build the section header regex pattern
12+
function Get-SectionHeaderRegex {
13+
param(
14+
[Parameter(Mandatory = $true)]
15+
[string]$InitialAtxHeader
16+
)
17+
return "^${InitialAtxHeader}${SECTION_HEADER_REGEX_SUFFIX}"
18+
}
19+
1120
# Returns a Collection of changeLogEntry object containing changelog info for all versions present in the gived CHANGELOG
1221
function Get-ChangeLogEntries {
1322
param (
@@ -49,7 +58,7 @@ function Get-ChangeLogEntriesFromContent {
4958
$initialAtxHeader = $matches["HeaderLevel"]
5059
}
5160

52-
$sectionHeaderRegex = "^${initialAtxHeader}${SECTION_HEADER_REGEX_SUFFIX}"
61+
$sectionHeaderRegex = Get-SectionHeaderRegex -InitialAtxHeader $initialAtxHeader
5362
$changeLogEntries | Add-Member -NotePropertyName "InitialAtxHeader" -NotePropertyValue $initialAtxHeader
5463
$releaseTitleAtxHeader = $initialAtxHeader + "#"
5564
$headerLines = @()
@@ -301,7 +310,7 @@ function Remove-EmptySections {
301310
$InitialAtxHeader = "#"
302311
)
303312

304-
$sectionHeaderRegex = "^${InitialAtxHeader}${SECTION_HEADER_REGEX_SUFFIX}"
313+
$sectionHeaderRegex = Get-SectionHeaderRegex -InitialAtxHeader $InitialAtxHeader
305314
$releaseContent = $ChangeLogEntry.ReleaseContent
306315

307316
if ($releaseContent.Count -gt 0)
@@ -460,3 +469,135 @@ function Confirm-ChangeLogForRelease {
460469
}
461470
return $ChangeLogStatus.IsValid
462471
}
472+
473+
function Parse-ChangelogContent {
474+
<#
475+
.SYNOPSIS
476+
Parses raw changelog text into structured content with sections.
477+
478+
.DESCRIPTION
479+
Takes raw changelog text and parses it into structured arrays containing
480+
ReleaseContent (all lines) and Sections (organized by section headers).
481+
This function only generates content structure without modifying any files.
482+
483+
.PARAMETER ChangelogText
484+
The new changelog text containing sections (e.g., "### Breaking Changes", "### Features Added").
485+
486+
.PARAMETER InitialAtxHeader
487+
The markdown header level used in the changelog (e.g., "#" for H1, "##" for H2).
488+
Defaults to "#".
489+
490+
.OUTPUTS
491+
PSCustomObject with ReleaseContent and Sections properties.
492+
493+
.EXAMPLE
494+
$content = Parse-ChangelogContent -ChangelogText $changelogText -InitialAtxHeader "#"
495+
$content.ReleaseContent # Array of all lines
496+
$content.Sections # Hashtable of section name to content lines
497+
#>
498+
[CmdletBinding()]
499+
param(
500+
[Parameter(Mandatory = $true)]
501+
[ValidateNotNullOrEmpty()]
502+
[string]$ChangelogText,
503+
504+
[Parameter(Mandatory = $false)]
505+
[ValidateNotNullOrEmpty()]
506+
[string]$InitialAtxHeader = "#"
507+
)
508+
509+
Write-Verbose "Parsing changelog text into structured content..."
510+
511+
# Parse the new changelog content into lines
512+
$changelogLines = $ChangelogText -split "`r?`n"
513+
514+
# Initialize content structure
515+
$releaseContent = @()
516+
$sections = @{}
517+
518+
# Add an empty line after the version header
519+
$releaseContent += ""
520+
521+
# Parse the changelog content
522+
# InitialAtxHeader represents the markdown header level (e.g., "#" for H1, "##" for H2)
523+
# Section headers are two levels deeper than the changelog title
524+
# (e.g., "### Breaking Changes" if InitialAtxHeader is "#")
525+
$currentSection = $null
526+
$sectionHeaderRegex = Get-SectionHeaderRegex -InitialAtxHeader $InitialAtxHeader
527+
528+
foreach ($line in $changelogLines) {
529+
if ($line.Trim() -match $sectionHeaderRegex) {
530+
$currentSection = $matches["sectionName"].Trim()
531+
$sections[$currentSection] = @()
532+
$releaseContent += $line
533+
Write-Verbose " Found section: $currentSection"
534+
}
535+
elseif ($currentSection) {
536+
$sections[$currentSection] += $line
537+
$releaseContent += $line
538+
}
539+
else {
540+
$releaseContent += $line
541+
}
542+
}
543+
544+
Write-Verbose " Parsed $($sections.Count) section(s)"
545+
546+
# Return structured content
547+
return [PSCustomObject]@{
548+
ReleaseContent = $releaseContent
549+
Sections = $sections
550+
}
551+
}
552+
553+
function Set-ChangeLogEntryContent {
554+
<#
555+
.SYNOPSIS
556+
Updates a changelog entry with new content.
557+
558+
.DESCRIPTION
559+
Takes a changelog entry object and new changelog text, parses the text into
560+
structured content, and updates the entry's ReleaseContent and Sections properties.
561+
562+
.PARAMETER ChangeLogEntry
563+
The changelog entry object to update (from Get-ChangeLogEntries).
564+
565+
.PARAMETER NewContent
566+
The new changelog text containing sections.
567+
568+
.PARAMETER InitialAtxHeader
569+
The markdown header level used in the changelog. Defaults to "#".
570+
571+
.OUTPUTS
572+
The updated changelog entry object.
573+
574+
.EXAMPLE
575+
$entries = Get-ChangeLogEntries -ChangeLogLocation $changelogPath
576+
$entry = $entries["1.0.0"]
577+
Set-ChangeLogEntryContent -ChangeLogEntry $entry -NewContent $newText -InitialAtxHeader $entries.InitialAtxHeader
578+
Set-ChangeLogContent -ChangeLogLocation $changelogPath -ChangeLogEntries $entries
579+
#>
580+
[CmdletBinding()]
581+
param(
582+
[Parameter(Mandatory = $true)]
583+
[ValidateNotNull()]
584+
[PSCustomObject]$ChangeLogEntry,
585+
586+
[Parameter(Mandatory = $true)]
587+
[ValidateNotNullOrEmpty()]
588+
[string]$NewContent,
589+
590+
[Parameter(Mandatory = $false)]
591+
[ValidateNotNullOrEmpty()]
592+
[string]$InitialAtxHeader = "#"
593+
)
594+
595+
# Parse the new content into structured format
596+
$parsedContent = Parse-ChangelogContent -ChangelogText $NewContent -InitialAtxHeader $InitialAtxHeader
597+
598+
# Update the entry with the parsed content
599+
$ChangeLogEntry.ReleaseContent = $parsedContent.ReleaseContent
600+
$ChangeLogEntry.Sections = $parsedContent.Sections
601+
602+
return $ChangeLogEntry
603+
}

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

Lines changed: 15 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'"
@@ -516,6 +517,7 @@ function CreateOrUpdatePackageWorkItem($lang, $pkg, $verMajorMinor, $existingIte
516517
$pkgType = $pkg.Type
517518
$pkgNewLibrary = $pkg.New
518519
$pkgRepoPath = $pkg.RepoPath
520+
$specProjectPath = $pkg.SpecProjectPath
519521
$serviceName = $pkg.ServiceName
520522
$title = $lang + " - " + $pkg.DisplayName + " - " + $verMajorMinor
521523

@@ -1256,7 +1258,8 @@ function Update-DevOpsReleaseWorkItem {
12561258
[string]$packageNewLibrary = "true",
12571259
[string]$relatedWorkItemId = $null,
12581260
[string]$tag = $null,
1259-
[bool]$inRelease = $true
1261+
[bool]$inRelease = $true,
1262+
[string]$specProjectPath = ""
12601263
)
12611264

12621265
if (!(Get-Command az -ErrorAction SilentlyContinue)) {
@@ -1280,6 +1283,7 @@ function Update-DevOpsReleaseWorkItem {
12801283
RepoPath = $packageRepoPath
12811284
Type = $packageType
12821285
New = $packageNewLibrary
1286+
SpecProjectPath = $specProjectPath
12831287
};
12841288

12851289
if (!$plannedDate) {
@@ -1326,6 +1330,16 @@ function Update-DevOpsReleaseWorkItem {
13261330
}
13271331
$updatedWI = UpdatePackageVersions $workItem -plannedVersions $plannedVersions
13281332

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

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: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ foreach ($pkg in $allPackageProperties)
144144
if (-not [System.String]::IsNullOrEmpty($pkg.Group)) {
145145
Write-Host "GroupId: $($pkg.Group)"
146146
}
147+
Write-Host "Spec Project Path: $($pkg.SpecProjectPath)"
147148
Write-Host "Release date: $($pkg.ReleaseStatus)"
148149
$configFilePrefix = $pkg.Name
149150

eng/common/scripts/Validate-All-Packages.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,8 @@ function CreateUpdatePackageWorkItem($pkgInfo)
155155
-packageNewLibrary $pkgInfo.IsNewSDK `
156156
-serviceName "unknown" `
157157
-packageDisplayName "unknown" `
158-
-inRelease $IsReleaseBuild
158+
-inRelease $IsReleaseBuild `
159+
-specProjectPath $pkgInfo.SpecProjectPath
159160

160161
if (-not $result)
161162
{

eng/common/scripts/Verify-ChangeLogs.ps1

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# Wrapper Script for ChangeLog Verification in a PR
22
[CmdletBinding()]
33
param (
4-
[String]$PackagePropertiesFolder
4+
[String]$PackagePropertiesFolder,
5+
[boolean]$ForRelease = $False
56
)
67
Set-StrictMode -Version 3
78

@@ -33,7 +34,9 @@ foreach($propertiesFile in $packageProperties) {
3334
continue
3435
}
3536

36-
$validChangeLog = Confirm-ChangeLogEntry -ChangeLogLocation $PackageProp.ChangeLogPath -VersionString $PackageProp.Version -ForRelease $false
37+
Write-Host "Verifying changelog for $($PackageProp.Name)"
38+
39+
$validChangeLog = Confirm-ChangeLogEntry -ChangeLogLocation $PackageProp.ChangeLogPath -VersionString $PackageProp.Version -ForRelease $ForRelease
3740

3841
if (-not $validChangeLog) {
3942
$allPassing = $false

eng/emitter-package-lock.json

Lines changed: 15 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)