From fd47716e413a1b9e2c93f978077409a55cb4a703 Mon Sep 17 00:00:00 2001 From: Daniel Jurek Date: Wed, 19 Nov 2025 22:51:11 +0000 Subject: [PATCH 01/14] Add field for Spec Project Path property --- .../scripts/Helpers/DevOps-WorkItem-Helpers.ps1 | 12 ++++++++++-- eng/common/scripts/Validate-All-Packages.ps1 | 11 ++++++++++- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/eng/common/scripts/Helpers/DevOps-WorkItem-Helpers.ps1 b/eng/common/scripts/Helpers/DevOps-WorkItem-Helpers.ps1 index 0c442a16c7b6..4784a01c4f13 100644 --- a/eng/common/scripts/Helpers/DevOps-WorkItem-Helpers.ps1 +++ b/eng/common/scripts/Helpers/DevOps-WorkItem-Helpers.ps1 @@ -477,6 +477,10 @@ function FindOrCreateClonePackageWorkItem($lang, $pkg, $verMajorMinor, $allowPro $pkg.RepoPath = $pkg.fields["Custom.PackageRepoPath"] } + if (!$pkg.SpecProjectPath -and $latestVersionItem.fields["Custom.SpecProjectPath"]) { + $pkg.SpecProjectPath = $latestVersionItem.fields["Custom.SpecProjectPath"] + } + if ($latestVersionItem.fields["Custom.Generated"]) { $extraFields += "`"Generated=" + $latestVersionItem.fields["Custom.Generated"] + "`"" } @@ -516,6 +520,7 @@ function CreateOrUpdatePackageWorkItem($lang, $pkg, $verMajorMinor, $existingIte $pkgType = $pkg.Type $pkgNewLibrary = $pkg.New $pkgRepoPath = $pkg.RepoPath + $specProjectPath = $pkg.SpecProjectPath $serviceName = $pkg.ServiceName $title = $lang + " - " + $pkg.DisplayName + " - " + $verMajorMinor @@ -528,6 +533,7 @@ function CreateOrUpdatePackageWorkItem($lang, $pkg, $verMajorMinor, $existingIte $fields += "`"PackageVersionMajorMinor=${verMajorMinor}`"" $fields += "`"ServiceName=${serviceName}`"" $fields += "`"PackageRepoPath=${pkgRepoPath}`"" + $fields += "`"SpecProjectPath=${specProjectPath}`"" if ($extraFields) { $fields += $extraFields @@ -545,7 +551,7 @@ function CreateOrUpdatePackageWorkItem($lang, $pkg, $verMajorMinor, $existingIte if ($pkgNewLibrary -ne $existingItem.fields["Custom.PackageTypeNewLibrary"]) { $changedField = "Custom.PackageTypeNewLibrary" } if ($pkgRepoPath -ne $existingItem.fields["Custom.PackageRepoPath"]) { $changedField = "Custom.PackageRepoPath" } if ($serviceName -ne $existingItem.fields["Custom.ServiceName"]) { $changedField = "Custom.ServiceName" } - if ($title -ne $existingItem.fields["System.Title"]) { $changedField = "System.Title" } + if ($specProjectPath -ne $existingItem.fields["Custom.SpecProjectPath"]) { $changedField = "Custom.SpecProjectPath" } if ($changedField) { Write-Host "At least field $changedField ($($existingItem.fields[$changedField])) changed so updating." @@ -1256,7 +1262,8 @@ function Update-DevOpsReleaseWorkItem { [string]$packageNewLibrary = "true", [string]$relatedWorkItemId = $null, [string]$tag = $null, - [bool]$inRelease = $true + [bool]$inRelease = $true, + [string]$specProjectPath = "" ) if (!(Get-Command az -ErrorAction SilentlyContinue)) { @@ -1280,6 +1287,7 @@ function Update-DevOpsReleaseWorkItem { RepoPath = $packageRepoPath Type = $packageType New = $packageNewLibrary + SpecProjectPath = $specProjectPath }; if (!$plannedDate) { diff --git a/eng/common/scripts/Validate-All-Packages.ps1 b/eng/common/scripts/Validate-All-Packages.ps1 index ab65e1d4bdbd..30fb4245defd 100644 --- a/eng/common/scripts/Validate-All-Packages.ps1 +++ b/eng/common/scripts/Validate-All-Packages.ps1 @@ -27,6 +27,8 @@ Set-StrictMode -Version 3 . (Join-Path $PSScriptRoot common.ps1) . (Join-Path $PSScriptRoot Helpers\ApiView-Helpers.ps1) . (Join-Path $PSScriptRoot Helpers\DevOps-WorkItem-Helpers.ps1) +. (Join-Path $PSScriptRoot Helpers\PSModule-Helpers.ps1) +Install-ModuleIfNotInstalled "powershell-yaml" "0.4.7" | Import-Module # Function to validate change log function ValidateChangeLog($changeLogPath, $versionString, $validationStatus) @@ -145,6 +147,12 @@ function CreateUpdatePackageWorkItem($pkgInfo) $plannedDate = "unknown" } + $specProjectPath = '' + if ((Test-Path (Join-Path $pkgInfo.DirectoryPath tsp-location.yaml))){ + $tspLocation = Get-Content (Join-Path $pkgInfo.DirectoryPath tsp-location.yaml) | ConvertFrom-Yaml + $specProjectPath = $tspLocation.directory + } + # Create or update package work item $result = Update-DevOpsReleaseWorkItem -language $LanguageDisplayName ` -packageName $packageName ` @@ -155,7 +163,8 @@ function CreateUpdatePackageWorkItem($pkgInfo) -packageNewLibrary $pkgInfo.IsNewSDK ` -serviceName "unknown" ` -packageDisplayName "unknown" ` - -inRelease $IsReleaseBuild + -inRelease $IsReleaseBuild ` + -specProjectPath $specProjectPath if (-not $result) { From 92e15c590b7357e2ee54ea3384bf8bd4a635b078 Mon Sep 17 00:00:00 2001 From: Daniel Jurek Date: Wed, 19 Nov 2025 23:08:55 +0000 Subject: [PATCH 02/14] Reorder properties --- eng/common/scripts/Helpers/DevOps-WorkItem-Helpers.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/common/scripts/Helpers/DevOps-WorkItem-Helpers.ps1 b/eng/common/scripts/Helpers/DevOps-WorkItem-Helpers.ps1 index 4784a01c4f13..fb6d8d6f7321 100644 --- a/eng/common/scripts/Helpers/DevOps-WorkItem-Helpers.ps1 +++ b/eng/common/scripts/Helpers/DevOps-WorkItem-Helpers.ps1 @@ -550,8 +550,8 @@ function CreateOrUpdatePackageWorkItem($lang, $pkg, $verMajorMinor, $existingIte if ($pkgType -ne [string]$existingItem.fields["Custom.PackageType"]) { $changedField = "Custom.PackageType" } if ($pkgNewLibrary -ne $existingItem.fields["Custom.PackageTypeNewLibrary"]) { $changedField = "Custom.PackageTypeNewLibrary" } if ($pkgRepoPath -ne $existingItem.fields["Custom.PackageRepoPath"]) { $changedField = "Custom.PackageRepoPath" } - if ($serviceName -ne $existingItem.fields["Custom.ServiceName"]) { $changedField = "Custom.ServiceName" } if ($specProjectPath -ne $existingItem.fields["Custom.SpecProjectPath"]) { $changedField = "Custom.SpecProjectPath" } + if ($serviceName -ne $existingItem.fields["Custom.ServiceName"]) { $changedField = "Custom.ServiceName" } if ($changedField) { Write-Host "At least field $changedField ($($existingItem.fields[$changedField])) changed so updating." From 43737daa7ac9f896af1bfbfc3a02698f21571d11 Mon Sep 17 00:00:00 2001 From: Daniel Jurek Date: Wed, 19 Nov 2025 23:17:26 +0000 Subject: [PATCH 03/14] Cleanup --- eng/common/scripts/Validate-All-Packages.ps1 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/eng/common/scripts/Validate-All-Packages.ps1 b/eng/common/scripts/Validate-All-Packages.ps1 index 30fb4245defd..213537988ba9 100644 --- a/eng/common/scripts/Validate-All-Packages.ps1 +++ b/eng/common/scripts/Validate-All-Packages.ps1 @@ -148,8 +148,9 @@ function CreateUpdatePackageWorkItem($pkgInfo) } $specProjectPath = '' - if ((Test-Path (Join-Path $pkgInfo.DirectoryPath tsp-location.yaml))){ - $tspLocation = Get-Content (Join-Path $pkgInfo.DirectoryPath tsp-location.yaml) | ConvertFrom-Yaml + $tspLocationYmlPath = Join-Path "$PSScriptRoot/../../.." $pkgInfo.DirectoryPath 'tsp-location.yaml' + if (Test-Path $tspLocationYmlPath) { + $tspLocation = Get-Content $tspLocationYmlPath | ConvertFrom-Yaml $specProjectPath = $tspLocation.directory } From e282e0b3ee48130b7d30e0a5a954edd3d09574e0 Mon Sep 17 00:00:00 2001 From: Daniel Jurek Date: Thu, 20 Nov 2025 03:39:53 +0000 Subject: [PATCH 04/14] Logging --- eng/common/scripts/Validate-All-Packages.ps1 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/eng/common/scripts/Validate-All-Packages.ps1 b/eng/common/scripts/Validate-All-Packages.ps1 index 213537988ba9..6433cea6ba6b 100644 --- a/eng/common/scripts/Validate-All-Packages.ps1 +++ b/eng/common/scripts/Validate-All-Packages.ps1 @@ -149,9 +149,11 @@ function CreateUpdatePackageWorkItem($pkgInfo) $specProjectPath = '' $tspLocationYmlPath = Join-Path "$PSScriptRoot/../../.." $pkgInfo.DirectoryPath 'tsp-location.yaml' - if (Test-Path $tspLocationYmlPath) { + if (Test-Path $tspLocationYmlPath) { + Write-Host "Found tsp-location.yaml at path: $tspLocationYmlPath" $tspLocation = Get-Content $tspLocationYmlPath | ConvertFrom-Yaml $specProjectPath = $tspLocation.directory + Write-Host "Spec project path extracted from tsp-location.yaml: $specProjectPath" } # Create or update package work item From 5c19024a7909f6f0cf6fbdd53df842edb2097cf6 Mon Sep 17 00:00:00 2001 From: Daniel Jurek Date: Thu, 20 Nov 2025 04:41:14 +0000 Subject: [PATCH 05/14] Move SpecProjectPath into Package-Properties.ps1 --- eng/common/scripts/Package-Properties.ps1 | 8 ++++++++ eng/common/scripts/Save-Package-Properties.ps1 | 1 + eng/common/scripts/Validate-All-Packages.ps1 | 13 +------------ 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/eng/common/scripts/Package-Properties.ps1 b/eng/common/scripts/Package-Properties.ps1 index 0142017c8468..9185a36d3c92 100644 --- a/eng/common/scripts/Package-Properties.ps1 +++ b/eng/common/scripts/Package-Properties.ps1 @@ -22,6 +22,10 @@ class PackageProps { [HashTable]$ArtifactDetails [HashTable]$CIParameters + # Path from root of azure-rest-api-specs repo to spec project (read from + # tsp-location.yaml if it exists in the package directory) + [string]$SpecProjectPath + PackageProps([string]$name, [string]$version, [string]$directoryPath, [string]$serviceDirectory) { $this.Initialize($name, $version, $directoryPath, $serviceDirectory) } @@ -61,6 +65,10 @@ class PackageProps { $this.ChangeLogPath = $null } + if (Test-Path (Join-Path $directoryPath 'tsp-location.yaml')) { + $this.SpecProjectPath = (LoadFrom-Yaml (Join-Path $directoryPath 'tsp-location.yaml')).directory + } + $this.CIParameters = @{"CIMatrixConfigs" = @()} $this.InitializeCIArtifacts() } diff --git a/eng/common/scripts/Save-Package-Properties.ps1 b/eng/common/scripts/Save-Package-Properties.ps1 index 0db23f276b96..7734f9ec3cba 100644 --- a/eng/common/scripts/Save-Package-Properties.ps1 +++ b/eng/common/scripts/Save-Package-Properties.ps1 @@ -144,6 +144,7 @@ foreach ($pkg in $allPackageProperties) if (-not [System.String]::IsNullOrEmpty($pkg.Group)) { Write-Host "GroupId: $($pkg.Group)" } + Write-Host "Spec Project Path: $($pkg.SpecProjectPath)" Write-Host "Release date: $($pkg.ReleaseStatus)" $configFilePrefix = $pkg.Name diff --git a/eng/common/scripts/Validate-All-Packages.ps1 b/eng/common/scripts/Validate-All-Packages.ps1 index 6433cea6ba6b..a247ec3b5110 100644 --- a/eng/common/scripts/Validate-All-Packages.ps1 +++ b/eng/common/scripts/Validate-All-Packages.ps1 @@ -27,8 +27,6 @@ Set-StrictMode -Version 3 . (Join-Path $PSScriptRoot common.ps1) . (Join-Path $PSScriptRoot Helpers\ApiView-Helpers.ps1) . (Join-Path $PSScriptRoot Helpers\DevOps-WorkItem-Helpers.ps1) -. (Join-Path $PSScriptRoot Helpers\PSModule-Helpers.ps1) -Install-ModuleIfNotInstalled "powershell-yaml" "0.4.7" | Import-Module # Function to validate change log function ValidateChangeLog($changeLogPath, $versionString, $validationStatus) @@ -147,15 +145,6 @@ function CreateUpdatePackageWorkItem($pkgInfo) $plannedDate = "unknown" } - $specProjectPath = '' - $tspLocationYmlPath = Join-Path "$PSScriptRoot/../../.." $pkgInfo.DirectoryPath 'tsp-location.yaml' - if (Test-Path $tspLocationYmlPath) { - Write-Host "Found tsp-location.yaml at path: $tspLocationYmlPath" - $tspLocation = Get-Content $tspLocationYmlPath | ConvertFrom-Yaml - $specProjectPath = $tspLocation.directory - Write-Host "Spec project path extracted from tsp-location.yaml: $specProjectPath" - } - # Create or update package work item $result = Update-DevOpsReleaseWorkItem -language $LanguageDisplayName ` -packageName $packageName ` @@ -167,7 +156,7 @@ function CreateUpdatePackageWorkItem($pkgInfo) -serviceName "unknown" ` -packageDisplayName "unknown" ` -inRelease $IsReleaseBuild ` - -specProjectPath $specProjectPath + -specProjectPath $pkgInfo.SpecProjectPath if (-not $result) { From cdb3e4dcc210762e7f4ac5ca0e9cb501bf11dab8 Mon Sep 17 00:00:00 2001 From: Daniel Jurek Date: Fri, 21 Nov 2025 17:59:58 +0000 Subject: [PATCH 06/14] Update SpecProjectPath --- eng/common/scripts/Helpers/DevOps-WorkItem-Helpers.ps1 | 5 +++++ eng/common/scripts/Update-DevOps-Release-WorkItem.ps1 | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/eng/common/scripts/Helpers/DevOps-WorkItem-Helpers.ps1 b/eng/common/scripts/Helpers/DevOps-WorkItem-Helpers.ps1 index fb6d8d6f7321..6db96f9055ab 100644 --- a/eng/common/scripts/Helpers/DevOps-WorkItem-Helpers.ps1 +++ b/eng/common/scripts/Helpers/DevOps-WorkItem-Helpers.ps1 @@ -1334,6 +1334,11 @@ function Update-DevOpsReleaseWorkItem { } $updatedWI = UpdatePackageVersions $workItem -plannedVersions $plannedVersions + if ($workItem.fields."Custom.SpecProjectPath" -ne $package.SpecProjectPath) { + Write-Host "Updating SpecProjectPath for work item $($workItem.id) to $($package.SpecProjectPath)" + UpdateWorkItem -id $workItem.id -fields "`"Custom.SpecProjectPath=$($package.SpecProjectPath)`"" + } + Write-Host "Release tracking item is at https://dev.azure.com/azure-sdk/Release/_workitems/edit/$($updatedWI.id)/" return $true } diff --git a/eng/common/scripts/Update-DevOps-Release-WorkItem.ps1 b/eng/common/scripts/Update-DevOps-Release-WorkItem.ps1 index aa3f98860c4c..0912c86421c3 100644 --- a/eng/common/scripts/Update-DevOps-Release-WorkItem.ps1 +++ b/eng/common/scripts/Update-DevOps-Release-WorkItem.ps1 @@ -15,7 +15,8 @@ param( [string]$packageNewLibrary = "true", [string]$relatedWorkItemId = $null, [string]$tag = $null, - [bool]$inRelease = $true + [bool]$inRelease = $true, + [string]$specProjectPath = "" ) #Requires -Version 6.0 Set-StrictMode -Version 3 @@ -57,6 +58,7 @@ $packageInfo = [PSCustomObject][ordered]@{ RepoPath = $packageRepoPath Type = $packageType New = $packageNewLibrary + SpecProjectPath = $specProjectPath }; if (!$plannedDate) { From add3d7e562c4fbce06fd1ea82d3fb747a2692ac1 Mon Sep 17 00:00:00 2001 From: Daniel Jurek Date: Fri, 21 Nov 2025 18:01:45 +0000 Subject: [PATCH 07/14] Fix accidental removal of $title --- eng/common/scripts/Helpers/DevOps-WorkItem-Helpers.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/eng/common/scripts/Helpers/DevOps-WorkItem-Helpers.ps1 b/eng/common/scripts/Helpers/DevOps-WorkItem-Helpers.ps1 index 6db96f9055ab..76d4f7c27846 100644 --- a/eng/common/scripts/Helpers/DevOps-WorkItem-Helpers.ps1 +++ b/eng/common/scripts/Helpers/DevOps-WorkItem-Helpers.ps1 @@ -552,6 +552,7 @@ function CreateOrUpdatePackageWorkItem($lang, $pkg, $verMajorMinor, $existingIte if ($pkgRepoPath -ne $existingItem.fields["Custom.PackageRepoPath"]) { $changedField = "Custom.PackageRepoPath" } if ($specProjectPath -ne $existingItem.fields["Custom.SpecProjectPath"]) { $changedField = "Custom.SpecProjectPath" } if ($serviceName -ne $existingItem.fields["Custom.ServiceName"]) { $changedField = "Custom.ServiceName" } + if ($title -ne $existingItem.fields["System.Title"]) { $changedField = "System.Title" } if ($changedField) { Write-Host "At least field $changedField ($($existingItem.fields[$changedField])) changed so updating." From a22233e76b205f5c0ff403655cb3929de1b3be87 Mon Sep 17 00:00:00 2001 From: Daniel Jurek Date: Fri, 21 Nov 2025 19:34:31 +0000 Subject: [PATCH 08/14] Create or update with SpecProjectPath --- .../Helpers/DevOps-WorkItem-Helpers.ps1 | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/eng/common/scripts/Helpers/DevOps-WorkItem-Helpers.ps1 b/eng/common/scripts/Helpers/DevOps-WorkItem-Helpers.ps1 index 76d4f7c27846..77d5cff7fbd7 100644 --- a/eng/common/scripts/Helpers/DevOps-WorkItem-Helpers.ps1 +++ b/eng/common/scripts/Helpers/DevOps-WorkItem-Helpers.ps1 @@ -268,6 +268,7 @@ function FindPackageWorkItem($lang, $packageName, $version, $outputCommand = $tr $fields += "Custom.Generated" $fields += "Custom.RoadmapState" $fields += "Microsoft.VSTS.Common.StateChangeDate" + $fields += "Custom.SpecProjectPath" $fieldList = ($fields | ForEach-Object { "[$_]"}) -join ", " $query = "SELECT ${fieldList} FROM WorkItems WHERE [Work Item Type] = 'Package'" @@ -533,7 +534,10 @@ function CreateOrUpdatePackageWorkItem($lang, $pkg, $verMajorMinor, $existingIte $fields += "`"PackageVersionMajorMinor=${verMajorMinor}`"" $fields += "`"ServiceName=${serviceName}`"" $fields += "`"PackageRepoPath=${pkgRepoPath}`"" - $fields += "`"SpecProjectPath=${specProjectPath}`"" + + if ($specProjectPath) { + $fields += "`"Custom.SpecProjectPath=${specProjectPath}`"" + } if ($extraFields) { $fields += $extraFields @@ -552,7 +556,6 @@ function CreateOrUpdatePackageWorkItem($lang, $pkg, $verMajorMinor, $existingIte if ($pkgRepoPath -ne $existingItem.fields["Custom.PackageRepoPath"]) { $changedField = "Custom.PackageRepoPath" } if ($specProjectPath -ne $existingItem.fields["Custom.SpecProjectPath"]) { $changedField = "Custom.SpecProjectPath" } if ($serviceName -ne $existingItem.fields["Custom.ServiceName"]) { $changedField = "Custom.ServiceName" } - if ($title -ne $existingItem.fields["System.Title"]) { $changedField = "System.Title" } if ($changedField) { Write-Host "At least field $changedField ($($existingItem.fields[$changedField])) changed so updating." @@ -1335,9 +1338,16 @@ function Update-DevOpsReleaseWorkItem { } $updatedWI = UpdatePackageVersions $workItem -plannedVersions $plannedVersions - if ($workItem.fields."Custom.SpecProjectPath" -ne $package.SpecProjectPath) { - Write-Host "Updating SpecProjectPath for work item $($workItem.id) to $($package.SpecProjectPath)" - UpdateWorkItem -id $workItem.id -fields "`"Custom.SpecProjectPath=$($package.SpecProjectPath)`"" + + + if ((!$workItem.fields.ContainsKey('Custom.SpecProjectPath') -and $packageInfo.SpecProjectPath) -or + ($workItem.fields.ContainsKey('Custom.SpecProjectPath') -and ($workItem.fields['Custom.SpecProjectPath'] -ne $packageInfo.SpecProjectPath)) + ) { + Write-Host "Updating SpecProjectPath to '$($packageInfo.SpecProjectPath)' for work item [$($workItem.id)]" + UpdateWorkItem ` + -id $workItem.id ` + -fields "`"Custom.SpecProjectPath=$($packageInfo.SpecProjectPath)`"" ` + -outputCommand $false } Write-Host "Release tracking item is at https://dev.azure.com/azure-sdk/Release/_workitems/edit/$($updatedWI.id)/" From a0a18d3578e3c73dd4ea6b4f78bd2be2ed1ca201 Mon Sep 17 00:00:00 2001 From: Daniel Jurek Date: Fri, 21 Nov 2025 19:36:07 +0000 Subject: [PATCH 09/14] Revert logic, cannot test --- eng/common/scripts/Helpers/DevOps-WorkItem-Helpers.ps1 | 4 ---- 1 file changed, 4 deletions(-) diff --git a/eng/common/scripts/Helpers/DevOps-WorkItem-Helpers.ps1 b/eng/common/scripts/Helpers/DevOps-WorkItem-Helpers.ps1 index 77d5cff7fbd7..5859bfd15ac4 100644 --- a/eng/common/scripts/Helpers/DevOps-WorkItem-Helpers.ps1 +++ b/eng/common/scripts/Helpers/DevOps-WorkItem-Helpers.ps1 @@ -478,10 +478,6 @@ function FindOrCreateClonePackageWorkItem($lang, $pkg, $verMajorMinor, $allowPro $pkg.RepoPath = $pkg.fields["Custom.PackageRepoPath"] } - if (!$pkg.SpecProjectPath -and $latestVersionItem.fields["Custom.SpecProjectPath"]) { - $pkg.SpecProjectPath = $latestVersionItem.fields["Custom.SpecProjectPath"] - } - if ($latestVersionItem.fields["Custom.Generated"]) { $extraFields += "`"Generated=" + $latestVersionItem.fields["Custom.Generated"] + "`"" } From 3ff589cff1752d09abc49dfab100fe7d5818c5e5 Mon Sep 17 00:00:00 2001 From: Daniel Jurek Date: Fri, 21 Nov 2025 19:37:22 +0000 Subject: [PATCH 10/14] Revert logic, cannot test --- eng/common/scripts/Helpers/DevOps-WorkItem-Helpers.ps1 | 1 - 1 file changed, 1 deletion(-) diff --git a/eng/common/scripts/Helpers/DevOps-WorkItem-Helpers.ps1 b/eng/common/scripts/Helpers/DevOps-WorkItem-Helpers.ps1 index 5859bfd15ac4..c04bc23428e0 100644 --- a/eng/common/scripts/Helpers/DevOps-WorkItem-Helpers.ps1 +++ b/eng/common/scripts/Helpers/DevOps-WorkItem-Helpers.ps1 @@ -550,7 +550,6 @@ function CreateOrUpdatePackageWorkItem($lang, $pkg, $verMajorMinor, $existingIte if ($pkgType -ne [string]$existingItem.fields["Custom.PackageType"]) { $changedField = "Custom.PackageType" } if ($pkgNewLibrary -ne $existingItem.fields["Custom.PackageTypeNewLibrary"]) { $changedField = "Custom.PackageTypeNewLibrary" } if ($pkgRepoPath -ne $existingItem.fields["Custom.PackageRepoPath"]) { $changedField = "Custom.PackageRepoPath" } - if ($specProjectPath -ne $existingItem.fields["Custom.SpecProjectPath"]) { $changedField = "Custom.SpecProjectPath" } if ($serviceName -ne $existingItem.fields["Custom.ServiceName"]) { $changedField = "Custom.ServiceName" } if ($changedField) { From f84a0569580e15ab994a5786bc0d34a95c6010d6 Mon Sep 17 00:00:00 2001 From: Daniel Jurek Date: Fri, 21 Nov 2025 19:42:26 +0000 Subject: [PATCH 11/14] Revert irrelevant file --- eng/common/scripts/Update-DevOps-Release-WorkItem.ps1 | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/eng/common/scripts/Update-DevOps-Release-WorkItem.ps1 b/eng/common/scripts/Update-DevOps-Release-WorkItem.ps1 index 0912c86421c3..aa3f98860c4c 100644 --- a/eng/common/scripts/Update-DevOps-Release-WorkItem.ps1 +++ b/eng/common/scripts/Update-DevOps-Release-WorkItem.ps1 @@ -15,8 +15,7 @@ param( [string]$packageNewLibrary = "true", [string]$relatedWorkItemId = $null, [string]$tag = $null, - [bool]$inRelease = $true, - [string]$specProjectPath = "" + [bool]$inRelease = $true ) #Requires -Version 6.0 Set-StrictMode -Version 3 @@ -58,7 +57,6 @@ $packageInfo = [PSCustomObject][ordered]@{ RepoPath = $packageRepoPath Type = $packageType New = $packageNewLibrary - SpecProjectPath = $specProjectPath }; if (!$plannedDate) { From 93319821e3f47f17ca2520b3ff389b6997dadd22 Mon Sep 17 00:00:00 2001 From: Daniel Jurek Date: Tue, 25 Nov 2025 20:30:24 +0000 Subject: [PATCH 12/14] Retain title --- eng/common/scripts/Helpers/DevOps-WorkItem-Helpers.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/eng/common/scripts/Helpers/DevOps-WorkItem-Helpers.ps1 b/eng/common/scripts/Helpers/DevOps-WorkItem-Helpers.ps1 index c04bc23428e0..27796148f20d 100644 --- a/eng/common/scripts/Helpers/DevOps-WorkItem-Helpers.ps1 +++ b/eng/common/scripts/Helpers/DevOps-WorkItem-Helpers.ps1 @@ -551,6 +551,7 @@ function CreateOrUpdatePackageWorkItem($lang, $pkg, $verMajorMinor, $existingIte if ($pkgNewLibrary -ne $existingItem.fields["Custom.PackageTypeNewLibrary"]) { $changedField = "Custom.PackageTypeNewLibrary" } if ($pkgRepoPath -ne $existingItem.fields["Custom.PackageRepoPath"]) { $changedField = "Custom.PackageRepoPath" } if ($serviceName -ne $existingItem.fields["Custom.ServiceName"]) { $changedField = "Custom.ServiceName" } + if ($title -ne $existingItem.fields["System.Title"]) { $changedField = "System.Title" } if ($changedField) { Write-Host "At least field $changedField ($($existingItem.fields[$changedField])) changed so updating." From f19b13383e4ffd8aea96f4c1f88a660958c11bef Mon Sep 17 00:00:00 2001 From: Daniel Jurek Date: Mon, 1 Dec 2025 20:06:26 +0000 Subject: [PATCH 13/14] Review feedback --- eng/common/scripts/Helpers/DevOps-WorkItem-Helpers.ps1 | 2 -- eng/common/scripts/Package-Properties.ps1 | 5 ++++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/eng/common/scripts/Helpers/DevOps-WorkItem-Helpers.ps1 b/eng/common/scripts/Helpers/DevOps-WorkItem-Helpers.ps1 index 27796148f20d..1fd22527af00 100644 --- a/eng/common/scripts/Helpers/DevOps-WorkItem-Helpers.ps1 +++ b/eng/common/scripts/Helpers/DevOps-WorkItem-Helpers.ps1 @@ -1334,8 +1334,6 @@ function Update-DevOpsReleaseWorkItem { } $updatedWI = UpdatePackageVersions $workItem -plannedVersions $plannedVersions - - if ((!$workItem.fields.ContainsKey('Custom.SpecProjectPath') -and $packageInfo.SpecProjectPath) -or ($workItem.fields.ContainsKey('Custom.SpecProjectPath') -and ($workItem.fields['Custom.SpecProjectPath'] -ne $packageInfo.SpecProjectPath)) ) { diff --git a/eng/common/scripts/Package-Properties.ps1 b/eng/common/scripts/Package-Properties.ps1 index 9185a36d3c92..930602444fdb 100644 --- a/eng/common/scripts/Package-Properties.ps1 +++ b/eng/common/scripts/Package-Properties.ps1 @@ -66,7 +66,10 @@ class PackageProps { } if (Test-Path (Join-Path $directoryPath 'tsp-location.yaml')) { - $this.SpecProjectPath = (LoadFrom-Yaml (Join-Path $directoryPath 'tsp-location.yaml')).directory + $tspLocation = LoadFrom-Yaml (Join-Path $directoryPath 'tsp-location.yaml') + if ($tspLocation -and $tspLocation.directory) { + $this.SpecProjectPath = $tspLocation.directory + } } $this.CIParameters = @{"CIMatrixConfigs" = @()} From 4bd8bd5316a8de39a390593eea369d0f9fd59d15 Mon Sep 17 00:00:00 2001 From: Daniel Jurek Date: Mon, 1 Dec 2025 20:11:06 +0000 Subject: [PATCH 14/14] Review feedback --- eng/common/scripts/Helpers/DevOps-WorkItem-Helpers.ps1 | 4 ---- 1 file changed, 4 deletions(-) diff --git a/eng/common/scripts/Helpers/DevOps-WorkItem-Helpers.ps1 b/eng/common/scripts/Helpers/DevOps-WorkItem-Helpers.ps1 index 1fd22527af00..a18aaaeb6d22 100644 --- a/eng/common/scripts/Helpers/DevOps-WorkItem-Helpers.ps1 +++ b/eng/common/scripts/Helpers/DevOps-WorkItem-Helpers.ps1 @@ -531,10 +531,6 @@ function CreateOrUpdatePackageWorkItem($lang, $pkg, $verMajorMinor, $existingIte $fields += "`"ServiceName=${serviceName}`"" $fields += "`"PackageRepoPath=${pkgRepoPath}`"" - if ($specProjectPath) { - $fields += "`"Custom.SpecProjectPath=${specProjectPath}`"" - } - if ($extraFields) { $fields += $extraFields }