@@ -368,7 +368,7 @@ function Get-PrPkgProperties([string]$InputDiffJson) {
368
368
369
369
# this is the primary loop that identifies the packages that have changes
370
370
foreach ($pkg in $allPackageProperties ) {
371
- Write-Host " Processing changed files against $ ( $pkg.Name ) . $pkgCounter of $ ( $allPackageProperties.Count ) ."
371
+ Write-Verbose " Processing changed files against $ ( $pkg.Name ) . $pkgCounter of $ ( $allPackageProperties.Count ) ."
372
372
$pkgDirectory = (Resolve-Path " $ ( $pkg.DirectoryPath ) " ).Path.Replace(" `\" , " /" )
373
373
$lookupKey = $pkgDirectory.Replace ($RepoRoot , " " ).TrimStart(' \/' )
374
374
$lookup [$lookupKey ] = $pkg
@@ -389,6 +389,8 @@ function Get-PrPkgProperties([string]$InputDiffJson) {
389
389
# handle direct changes to packages
390
390
$shouldInclude = $filePath -eq $pkgDirectory -or $filePath -like " $pkgDirectory /*"
391
391
392
+ $includeMsg = " Including '$ ( $pkg.Name ) ' because of changed file '$filePath '."
393
+
392
394
# we only need to do additional work for indirect packages if we haven't already decided
393
395
# to include this package due to this file
394
396
if (-not $shouldInclude ) {
@@ -399,6 +401,7 @@ function Get-PrPkgProperties([string]$InputDiffJson) {
399
401
$includedForValidation = ($filePath -like (" $resolvedRelativePath /*" ) -or $filePath -eq $resolvedRelativePath )
400
402
$shouldInclude = $shouldInclude -or $includedForValidation
401
403
if ($includedForValidation ) {
404
+ $includeMsg += " - (triggerPath: '$triggerPath ')"
402
405
break
403
406
}
404
407
}
@@ -448,6 +451,8 @@ function Get-PrPkgProperties([string]$InputDiffJson) {
448
451
}
449
452
450
453
if ($shouldInclude ) {
454
+
455
+ LogInfo $includeMsg
451
456
$packagesWithChanges += $pkg
452
457
453
458
if ($pkg.AdditionalValidationPackages ) {
@@ -474,6 +479,7 @@ function Get-PrPkgProperties([string]$InputDiffJson) {
474
479
475
480
if ($pkg.Name -notin $existingPackageNames ) {
476
481
$pkg.IncludedForValidation = $true
482
+ LogInfo " Including '$ ( $pkg.Name ) ' for validation only because it is a dependency of another package."
477
483
$packagesWithChanges += $pkg
478
484
}
479
485
}
@@ -484,6 +490,9 @@ function Get-PrPkgProperties([string]$InputDiffJson) {
484
490
if ($AdditionalValidationPackagesFromPackageSetFn -and (Test-Path " Function:$AdditionalValidationPackagesFromPackageSetFn " )) {
485
491
$additionalPackages = & $AdditionalValidationPackagesFromPackageSetFn $packagesWithChanges $diff $allPackageProperties
486
492
$packagesWithChanges += $additionalPackages
493
+ foreach ($pkg in $additionalPackages ) {
494
+ LogInfo " Including '$ ( $pkg.Name ) ' from the additional validation package set."
495
+ }
487
496
}
488
497
489
498
# finally, if we have gotten all the way here and we still don't have any packages, we should include the template service
0 commit comments