From b0726c77a091b300ca40b633fad3cd5dc68a77db Mon Sep 17 00:00:00 2001 From: Scott Beddall Date: Thu, 27 Feb 2025 17:33:10 -0800 Subject: [PATCH 1/3] allow skipping of batching --- eng/common/scripts/job-matrix/Create-PrJobMatrix.ps1 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/eng/common/scripts/job-matrix/Create-PrJobMatrix.ps1 b/eng/common/scripts/job-matrix/Create-PrJobMatrix.ps1 index 27dde5430ec..5b213919cbe 100644 --- a/eng/common/scripts/job-matrix/Create-PrJobMatrix.ps1 +++ b/eng/common/scripts/job-matrix/Create-PrJobMatrix.ps1 @@ -144,6 +144,16 @@ function GeneratePRMatrixForBatch { } } + if ($matrixConfig.PSObject.Properties['PRBatch']) { + # if we are doing a PR Batch, we need to just add the matrix items directly to the OverallResult + # as the users have explicitly disabled PR batching for this matrix. + if (!$matrixConfig.PRBatch) { + Write-Host "The matrix config $($matrixConfig.Path) has PRBatch set to false, the matrix members will be directly added without batching by $PRMatrixSetting." + $OverallResult += $matrixResults + continue + } + } + $packageBatches = Split-ArrayIntoBatches -InputArray $matrixBatch -BatchSize $BATCHSIZE # we only need to modify the generated job name if there is more than one matrix config + batch From 5e2cfcb9982e402847368b270364fa6d0aaf7ee9 Mon Sep 17 00:00:00 2001 From: Scott Beddall Date: Mon, 3 Mar 2025 11:33:52 -0800 Subject: [PATCH 2/3] update the output of the error string --- eng/common/scripts/job-matrix/Create-PrJobMatrix.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/common/scripts/job-matrix/Create-PrJobMatrix.ps1 b/eng/common/scripts/job-matrix/Create-PrJobMatrix.ps1 index 5b213919cbe..1905356c664 100644 --- a/eng/common/scripts/job-matrix/Create-PrJobMatrix.ps1 +++ b/eng/common/scripts/job-matrix/Create-PrJobMatrix.ps1 @@ -148,7 +148,7 @@ function GeneratePRMatrixForBatch { # if we are doing a PR Batch, we need to just add the matrix items directly to the OverallResult # as the users have explicitly disabled PR batching for this matrix. if (!$matrixConfig.PRBatch) { - Write-Host "The matrix config $($matrixConfig.Path) has PRBatch set to false, the matrix members will be directly added without batching by $PRMatrixSetting." + Write-Host "The matrix config $($matrixConfig.Path) with name $($matrixConfig.Name) has PRBatch set to false, the matrix members will be directly added without batching by $PRMatrixSetting." $OverallResult += $matrixResults continue } From fc02b8e4d42a32b84af2f5384997f9256fdf1bc8 Mon Sep 17 00:00:00 2001 From: Scott Beddall Date: Mon, 3 Mar 2025 11:35:33 -0800 Subject: [PATCH 3/3] PRBatch -> PRBatching --- eng/common/scripts/job-matrix/Create-PrJobMatrix.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/common/scripts/job-matrix/Create-PrJobMatrix.ps1 b/eng/common/scripts/job-matrix/Create-PrJobMatrix.ps1 index 1905356c664..d93872328dd 100644 --- a/eng/common/scripts/job-matrix/Create-PrJobMatrix.ps1 +++ b/eng/common/scripts/job-matrix/Create-PrJobMatrix.ps1 @@ -144,10 +144,10 @@ function GeneratePRMatrixForBatch { } } - if ($matrixConfig.PSObject.Properties['PRBatch']) { + if ($matrixConfig.PSObject.Properties['PRBatching']) { # if we are doing a PR Batch, we need to just add the matrix items directly to the OverallResult # as the users have explicitly disabled PR batching for this matrix. - if (!$matrixConfig.PRBatch) { + if (!$matrixConfig.PRBatching) { Write-Host "The matrix config $($matrixConfig.Path) with name $($matrixConfig.Name) has PRBatch set to false, the matrix members will be directly added without batching by $PRMatrixSetting." $OverallResult += $matrixResults continue