Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create-PrJobMatrix #9281

Merged
merged 8 commits into from
Oct 30, 2024
1 change: 1 addition & 0 deletions eng/common/scripts/Package-Properties.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class PackageProps
# additional packages required for validation of this one
[string[]]$AdditionalValidationPackages
[HashTable]$ArtifactDetails
[HashTable[]]$CIMatrixConfigs

PackageProps([string]$name, [string]$version, [string]$directoryPath, [string]$serviceDirectory)
{
Expand Down
4 changes: 1 addition & 3 deletions eng/common/scripts/job-matrix/Create-PrJobMatrix.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,7 @@ $packageProperties = Get-ChildItem -Recurse "$PackagePropertiesFolder" *.json `

# set default matrix config for each package if there isn't an override
$packageProperties | ForEach-Object {
if (-not $_.CIMatrixConfigs) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I blindly took this and it definitely doesn't work. It's because CIMatrixConfigs isn't null, it's Empty Array.

$_.CIMatrixConfigs = $configs
}
$_.CIMatrixConfigs = $_.CIMatrixConfigs ?? $configs
}

# The key here is that after we group the packages by the matrix config objects, we can use the first item's MatrixConfig
Expand Down