@@ -368,7 +368,7 @@ function Get-PrPkgProperties([string]$InputDiffJson) {
368368
369369 # this is the primary loop that identifies the packages that have changes
370370 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 ) ."
372372 $pkgDirectory = (Resolve-Path " $ ( $pkg.DirectoryPath ) " ).Path.Replace(" `\" , " /" )
373373 $lookupKey = $pkgDirectory.Replace ($RepoRoot , " " ).TrimStart(' \/' )
374374 $lookup [$lookupKey ] = $pkg
@@ -389,6 +389,8 @@ function Get-PrPkgProperties([string]$InputDiffJson) {
389389 # handle direct changes to packages
390390 $shouldInclude = $filePath -eq $pkgDirectory -or $filePath -like " $pkgDirectory /*"
391391
392+ $includeMsg = " Including '$ ( $pkg.Name ) ' because of changed file '$filePath '."
393+
392394 # we only need to do additional work for indirect packages if we haven't already decided
393395 # to include this package due to this file
394396 if (-not $shouldInclude ) {
@@ -399,6 +401,7 @@ function Get-PrPkgProperties([string]$InputDiffJson) {
399401 $includedForValidation = ($filePath -like (" $resolvedRelativePath /*" ) -or $filePath -eq $resolvedRelativePath )
400402 $shouldInclude = $shouldInclude -or $includedForValidation
401403 if ($includedForValidation ) {
404+ $includeMsg += " - (triggerPath: '$triggerPath ')"
402405 break
403406 }
404407 }
@@ -448,6 +451,8 @@ function Get-PrPkgProperties([string]$InputDiffJson) {
448451 }
449452
450453 if ($shouldInclude ) {
454+
455+ LogInfo $includeMsg
451456 $packagesWithChanges += $pkg
452457
453458 if ($pkg.AdditionalValidationPackages ) {
@@ -474,6 +479,7 @@ function Get-PrPkgProperties([string]$InputDiffJson) {
474479
475480 if ($pkg.Name -notin $existingPackageNames ) {
476481 $pkg.IncludedForValidation = $true
482+ LogInfo " Including '$ ( $pkg.Name ) ' for validation only because it is a dependency of another package."
477483 $packagesWithChanges += $pkg
478484 }
479485 }
@@ -484,6 +490,9 @@ function Get-PrPkgProperties([string]$InputDiffJson) {
484490 if ($AdditionalValidationPackagesFromPackageSetFn -and (Test-Path " Function:$AdditionalValidationPackagesFromPackageSetFn " )) {
485491 $additionalPackages = & $AdditionalValidationPackagesFromPackageSetFn $packagesWithChanges $diff $allPackageProperties
486492 $packagesWithChanges += $additionalPackages
493+ foreach ($pkg in $additionalPackages ) {
494+ LogInfo " Including '$ ( $pkg.Name ) ' from the additional validation package set."
495+ }
487496 }
488497
489498 # 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