From 413e61ade428bb1048bd35bf92d97d26a00276aa Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Wed, 15 Jan 2025 13:35:45 -0800 Subject: [PATCH] Sync eng/common directory with azure-sdk-tools for PR 9635 (#6350) * ensure that packages that come back from AdditionalValidationPackages are NOT counted as 'includedForValidation: true' if they also exist in the original 'these packages changed' set Co-authored-by: Ben Broderick Phillips --------- Co-authored-by: Scott Beddall Co-authored-by: Scott Beddall <45376673+scbedd@users.noreply.github.com> Co-authored-by: Ben Broderick Phillips --- eng/common/scripts/Package-Properties.ps1 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/eng/common/scripts/Package-Properties.ps1 b/eng/common/scripts/Package-Properties.ps1 index 999d818b4..178452125 100644 --- a/eng/common/scripts/Package-Properties.ps1 +++ b/eng/common/scripts/Package-Properties.ps1 @@ -187,12 +187,17 @@ function Get-PrPkgProperties([string]$InputDiffJson) { } } + $existingPackageNames = @($packagesWithChanges | ForEach-Object { $_.Name }) foreach ($addition in $additionalValidationPackages) { $key = $addition.Replace($RepoRoot, "").TrimStart('\/') if ($lookup[$key]) { - $lookup[$key].IncludedForValidation = $true - $packagesWithChanges += $lookup[$key] + $pkg = $lookup[$key] + + if ($pkg.Name -notin $existingPackageNames) { + $pkg.IncludedForValidation = $true + $packagesWithChanges += $pkg + } } }