Skip to content

Commit

Permalink
Pass non sparse parameters through to PR job matrix generator (#48081)
Browse files Browse the repository at this point in the history
Co-authored-by: Ben Broderick Phillips <[email protected]>
  • Loading branch information
azure-sdk and benbp authored Feb 4, 2025
1 parent bdf4404 commit 479b84f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
7 changes: 5 additions & 2 deletions eng/common/scripts/job-matrix/Create-PrJobMatrix.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ function GeneratePRMatrixForBatch {
$matrixResults = @()
foreach ($matrixConfig in $matrixConfigs) {
Write-Host "Generating config for $($matrixConfig.Path)"
$nonSparse = $matrixConfig.PSObject.Properties['NonSparseParameters'] ? $matrixConfig.NonSparseParameters : @()

$matrixResults = @()
if ($directBatch) {
Expand All @@ -108,7 +109,8 @@ function GeneratePRMatrixForBatch {
-Selection $matrixConfig.Selection `
-DisplayNameFilter $DisplayNameFilter `
-Filters $Filters `
-Replace $Replace
-Replace $Replace `
-NonSparseParameters $nonSparse

if ($matrixResults) {
Write-Host "We have the following direct matrix results: "
Expand All @@ -121,7 +123,8 @@ function GeneratePRMatrixForBatch {
-Selection $matrixConfig.Selection `
-DisplayNameFilter $DisplayNameFilter `
-Filters ($Filters + $IndirectFilters) `
-Replace $Replace
-Replace $Replace `
-NonSparseParameters $nonSparse

if ($matrixResults) {
Write-Host "We have the following indirect matrix results: "
Expand Down
8 changes: 5 additions & 3 deletions eng/common/scripts/job-matrix/job-matrix-functions.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -743,10 +743,11 @@ function Get4dMatrixIndex([int]$index, [Array]$dimensions) {
function GenerateMatrixForConfig {
param (
[Parameter(Mandatory = $true)][string] $ConfigPath,
[Parameter(Mandatory = $True)][string] $Selection,
[Parameter(Mandatory = $true)][string] $Selection,
[Parameter(Mandatory = $false)][string] $DisplayNameFilter,
[Parameter(Mandatory = $false)][array] $Filters,
[Parameter(Mandatory = $false)][array] $Replace
[Parameter(Mandatory = $false)][array] $Replace,
[Parameter(Mandatory = $false)][Array] $NonSparseParameters = @()
)
$matrixFile = Join-Path $PSScriptRoot ".." ".." ".." ".." $ConfigPath

Expand All @@ -761,7 +762,8 @@ function GenerateMatrixForConfig {
-selectFromMatrixType $Selection `
-displayNameFilter $DisplayNameFilter `
-filters $Filters `
-replace $Replace
-replace $Replace `
-nonSparseParameters $NonSparseParameters

return , $matrix
}

0 comments on commit 479b84f

Please sign in to comment.