@@ -19,6 +19,7 @@ function Get-python-AdditionalValidationPackagesFromPackageSet {
1919 $AllPkgProps
2020 )
2121 $additionalValidationPackages = @ ()
22+ $uniqueResultSet = @ ()
2223
2324 function isOther ($fileName ) {
2425 $startsWithPrefixes = @ (" .config" , " .devcontainer" , " .github" , " .vscode" , " common" , " conda" , " doc" , " eng" , " scripts" )
@@ -33,6 +34,11 @@ function Get-python-AdditionalValidationPackagesFromPackageSet {
3334 return $startsWith
3435 }
3536
37+ # this section will identify the list of packages that we should treat as
38+ # "directly" changed for a given service level change. While that doesn't
39+ # directly change a package within the service, I do believe we should directly include all
40+ # packages WITHIN that service. This is because the service level file changes are likely to
41+ # have an impact on the packages within that service.
3642 $changedServices = @ ()
3743 foreach ($file in $diffObj.ChangedFiles ) {
3844 $pathComponents = $file -split " /"
@@ -46,6 +52,18 @@ function Get-python-AdditionalValidationPackagesFromPackageSet {
4652 changedServices += " template"
4753 }
4854 }
55+ foreach ($changedService in $changedServices ) {
56+ $additionalPackages = $AllPkgProps | Where-Object { $_.ServiceDirectory -eq $changedService }
57+
58+ foreach ($pkg in $additionalPackages ) {
59+ if ($uniqueResultSet -notcontains $pkg -and $LocatedPackages -notcontains $pkg ) {
60+ # notice the lack of setting IncludedForValidation to true. This is because these "changed services"
61+ # are specifically where a file within the service, but not an individual package within that service has changed.
62+ # we want this package to be fully validated
63+ $uniqueResultSet += $pkg
64+ }
65+ }
66+ }
4967
5068 $toolChanged = $diffObj.ChangedFiles | Where-Object { $_.StartsWith (" tool" )}
5169 $engChanged = $diffObj.ChangedFiles | Where-Object { $_.StartsWith (" eng" )}
@@ -88,12 +106,7 @@ function Get-python-AdditionalValidationPackagesFromPackageSet {
88106 $additionalValidationPackages += $additionalPackages
89107 }
90108
91- foreach ($changedService in $changedServices ) {
92- $additionalPackages = $AllPkgProps | Where-Object { $_.ServiceDirectory -eq $changedService }
93- $additionalValidationPackages += $additionalPackages
94- }
95109
96- $uniqueResultSet = @ ()
97110 foreach ($pkg in $additionalValidationPackages ) {
98111 if ($uniqueResultSet -notcontains $pkg -and $LocatedPackages -notcontains $pkg ) {
99112 $pkg.IncludedForValidation = $true
0 commit comments