Skip to content

Support pool-specific PR job batch sizes - #16674

Merged
Ben Broderick Phillips (benbp) merged 2 commits into
Azure:mainfrom
weikanglim:weikanglim/pr-job-batch-size-by-pool
Aug 12, 2026
Merged

Support pool-specific PR job batch sizes#16674
Ben Broderick Phillips (benbp) merged 2 commits into
Azure:mainfrom
weikanglim:weikanglim/pr-job-batch-size-by-pool

Conversation

@weikanglim

@weikanglim Wei Lim (weikanglim) commented Aug 5, 2026

Copy link
Copy Markdown
Member

Add an optional PRJobBatchSizeByPool map to generate-job-matrix.yml to configure batch sizes per-pool.

We allow override values of PRJobBatchSizeByPool to come from runtime variables populated by PreGenerationSteps (which is useful). In cases where no override exists or a runtime macro remains unset, we use the default PRJobBatchSize value.

Motivation

Some consumers preprocess PackageInfo entries into scheduling buckets whose optimal grouping differs by agent pool. For example, Azure/azure-sdk-for-net#57798 combines three weighted buckets per Linux and Windows job while using one per slower macOS job. This keeps that policy in the consuming repository while exposing only a generic per-pool batch-size capability from the centrally owned template.

Existing callers are unchanged because the new map defaults to empty and the current PRJobBatchSize remains the fallback.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
63 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@azure-sdk-automation

Copy link
Copy Markdown
Contributor

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

@weikanglim
Wei Lim (weikanglim) marked this pull request as ready for review August 5, 2026 23:55
@weikanglim
Wei Lim (weikanglim) requested a review from a team as a code owner August 5, 2026 23:55
Copilot AI lite review requested due to automatic review settings August 5, 2026 23:55
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
63 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds a per-agent-pool override mechanism for PR job batching in the shared generate-job-matrix.yml template, enabling consuming repos to tune PackageInfo grouping based on pool performance characteristics while preserving the existing global default.

Changes:

  • Introduces a new PRJobBatchSizeByPool parameter (object map) with {} default.
  • Computes an effective $batchSize per pool at runtime, falling back to PRJobBatchSize when no override (or an unset runtime macro) is present.
  • Uses the computed $batchSize when invoking Create-PrJobMatrix.ps1.
Show a summary per file
File Description
eng/common/pipelines/templates/jobs/generate-job-matrix.yml Adds per-pool PR job batch size overrides and runtime selection logic before generating PR matrices.

Review details

  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Lite

Comment thread eng/common/pipelines/templates/jobs/generate-job-matrix.yml
@azure-sdk-automation

Copy link
Copy Markdown
Contributor

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

@azure-sdk-automation

Copy link
Copy Markdown
Contributor

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

@weikanglim
Wei Lim (weikanglim) force-pushed the weikanglim/pr-job-batch-size-by-pool branch from 0da15e7 to a727f50 Compare August 10, 2026 23:16
@azure-sdk-automation

Copy link
Copy Markdown
Contributor

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

Wei Lim (weikanglim) and others added 2 commits August 12, 2026 13:27
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@weikanglim
Wei Lim (weikanglim) force-pushed the weikanglim/pr-job-batch-size-by-pool branch from a727f50 to 046548e Compare August 12, 2026 20:28
@azure-sdk-automation

Copy link
Copy Markdown
Contributor

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

azure-sdk-automation Bot added a commit to Azure/azure-sdk-for-js that referenced this pull request Aug 12, 2026
Sync eng/common directory with azure-sdk-tools for PR
Azure/azure-sdk-tools#16674 See [eng/common
workflow](https://github.com/Azure/azure-sdk-tools/blob/main/eng/common/README.md#workflow)

---------

Co-authored-by: Wei Lim <weilim@microsoft.com>
Co-authored-by: Amp <amp@ampcode.com>
Co-authored-by: Wei Lim <weikanglim@gmail.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
azure-sdk-automation Bot added a commit to Azure/azure-sdk-for-rust that referenced this pull request Aug 12, 2026
Sync eng/common directory with azure-sdk-tools for PR
Azure/azure-sdk-tools#16674 See [eng/common
workflow](https://github.com/Azure/azure-sdk-tools/blob/main/eng/common/README.md#workflow)

---------

Co-authored-by: Wei Lim <weilim@microsoft.com>
Co-authored-by: Amp <amp@ampcode.com>
Co-authored-by: Wei Lim <weikanglim@gmail.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@benbp
Ben Broderick Phillips (benbp) merged commit 2a92188 into Azure:main Aug 12, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants