Skip to content

Commit

Permalink
allow indirect packages to run the full matrix, instead of being forc…
Browse files Browse the repository at this point in the history
…ed to sparse
  • Loading branch information
scbedd authored and azure-sdk committed Jan 24, 2025
1 parent 36824cd commit 7e7a7ff
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 5 additions & 1 deletion eng/common/pipelines/templates/jobs/generate-job-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ parameters:
- name: PRMatrixIndirectFilters
type: object
default: []
- name: PRMatrixSparseIndirect
type: boolean
default: true
# Mappings to OS name required at template compile time by 1es pipeline templates
- name: Pools
type: object
Expand Down Expand Up @@ -142,7 +145,8 @@ jobs:
-Filters '${{ join(''',''', parameters.MatrixFilters) }}', 'container=^$', 'SupportedClouds=^$|${{ parameters.CloudConfig.Cloud }}', 'Pool=${{ pool.filter }}' `
-IndirectFilters '${{ join(''',''', parameters.PRMatrixIndirectFilters) }}' `
-Replace '${{ join(''',''', parameters.MatrixReplace) }}' `
-PackagesPerPRJob ${{ parameters.PRJobBatchSize }}
-PackagesPerPRJob ${{ parameters.PRJobBatchSize }} `
-SparseIndirect $${{ parameters.PRMatrixSparseIndirect }}
displayName: Create ${{ pool.name }} PR Matrix
name: vm_job_matrix_pr_${{ pool.name }}
Expand Down
6 changes: 3 additions & 3 deletions eng/common/scripts/job-matrix/Create-PrJobMatrix.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ function QueuePop([ref]$queue) {
function GeneratePRMatrixForBatch {
param (
[Parameter(Mandatory = $true)][array] $Packages,
[Parameter(Mandatory = $true)][bool] $FullSparseMatrix
[Parameter(Mandatory = $false)][bool] $FullSparseMatrix = $false
)

$OverallResult = @()
Expand Down Expand Up @@ -159,7 +159,7 @@ function GeneratePRMatrixForBatch {
}

if ($batchSuffixNecessary) {
$outputItem["name"] = $outputItem["name"] + "$batchPrefix$batchCounter"
$outputItem["name"] = $outputItem["name"] + "$batchNamePrefix$batchCounter"
}

$OverallResult += $outputItem
Expand All @@ -184,7 +184,7 @@ function GeneratePRMatrixForBatch {
}

if ($batchSuffixNecessary) {
$outputItem["name"] = $outputItem["name"] + "_ib$batchCounter"
$outputItem["name"] = $outputItem["name"] + "_$batchNamePrefix$batchCounter"
}
# now we need to take an item from the front of the matrix results, clone it, and add it to the back of the matrix results
# we will add the cloned version to OverallResult
Expand Down

0 comments on commit 7e7a7ff

Please sign in to comment.