Sync eng/common directory with azure-sdk-tools for PR 9945 (#6444)

* allow skipping of batching during Create-PRJobMatrix
---------

Co-authored-by: Scott Beddall <scbedd@microsoft.com>
This commit is contained in:
Azure SDK Bot 2025-03-03 15:50:12 -08:00 committed by GitHub
parent 4983de1fb5
commit af764fe673
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -144,6 +144,16 @@ function GeneratePRMatrixForBatch {
}
}
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.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
}
}
$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