Skip to content

Sync eng/common directory with azure-sdk-tools for PR 16674 - #39562

Merged
azure-sdk-automation[bot] merged 2 commits into
mainfrom
sync-eng-common-weikanglim/pr-job-batch-size-by-pool-16674
Aug 12, 2026
Merged

Sync eng/common directory with azure-sdk-tools for PR 16674#39562
azure-sdk-automation[bot] merged 2 commits into
mainfrom
sync-eng-common-weikanglim/pr-job-batch-size-by-pool-16674

Conversation

@azure-sdk-automation

Copy link
Copy Markdown
Contributor

Sync eng/common directory with azure-sdk-tools for PR Azure/azure-sdk-tools#16674 See eng/common workflow

Copilot AI balanced review requested due to automatic review settings August 11, 2026 18:06
@azure-sdk-automation
azure-sdk-automation Bot requested a review from a team as a code owner August 11, 2026 18:06
@azure-sdk-automation azure-sdk-automation Bot added EngSys This issue is impacting the engineering system. Central-EngSys This issue is owned by the Engineering System team. labels Aug 11, 2026
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
10 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

Note

Copilot could not run the full agentic suite for this review because it was automatically requested on a bot-authored pull request. Request a review from Copilot under Reviewers to retry with the full agentic suite. Improved support for bot-authored pull requests is coming soon.

Adds support for pool-specific PR matrix job batching so different agent pools can process different numbers of PackageInfo entries per PR job.

Changes:

  • Introduces a new template parameter PRJobBatchSizeByPool for per-pool batch size overrides.
  • Adds PowerShell logic to resolve the effective batch size (default vs. override) and validate it.
  • Updates the PR matrix generation invocation to pass the resolved $batchSize instead of the global default.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Comment thread eng/common/pipelines/templates/jobs/generate-job-matrix.yml
Comment thread eng/common/pipelines/templates/jobs/generate-job-matrix.yml

@weikanglim Wei Lim (weikanglim) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The synchronized eng/common change is ready. Required checks are passing and all review threads have been addressed.

Wei Lim (weikanglim) and others added 2 commits August 12, 2026 20:36
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings August 12, 2026 20:37
@azure-sdk-automation
azure-sdk-automation Bot force-pushed the sync-eng-common-weikanglim/pr-job-batch-size-by-pool-16674 branch from 35e3f38 to b600ab6 Compare August 12, 2026 20:37

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

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Suppressed comments (2)

eng/common/pipelines/templates/jobs/generate-job-matrix.yml:153

  • Embedding JSON into a single-quoted PowerShell string can break if the JSON contains a single quote character (e.g., a pool name or value containing '), causing ConvertFrom-Json to fail. To make this robust, write the JSON to a file (similar to matrix.json) and read/parse it, or use a PowerShell here-string that safely contains the JSON payload.
            $batchSize = ${{ parameters.PRJobBatchSize }}
            $overrides = '${{ convertToJson(parameters.PRJobBatchSizeByPool) }}' | ConvertFrom-Json

eng/common/pipelines/templates/jobs/generate-job-matrix.yml:156

  • This property lookup is more complex than necessary and harder to read/maintain (pipeline + filtering) for a simple key lookup. Consider using a direct lookup approach (e.g., retrieving the property by name from PSObject.Properties or indexing into a hashtable) to reduce indirection and make the intent clearer.
            $poolOverride = $overrides.PSObject.Properties |
              Where-Object { $_.Name -eq '${{ pool.name }}' } |
              Select-Object -First 1

Copilot AI review requested due to automatic review settings August 12, 2026 20:37

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

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Suppressed comments (2)

eng/common/pipelines/templates/jobs/generate-job-matrix.yml:152

  • PRJobBatchSizeis declared as a YAMLnumber, which can include non-integer values (e.g. 2.5). The current logic only validates > 0and passes$batchSizethrough to-PackagesPerPRJob`, which is conceptually an integer count. Please enforce that the default value is an integer as well (e.g., by validating it’s a whole number and throwing a clear error if not), not only the override path. This prevents accidental fractional values from causing incorrect batching or downstream script errors.
            $batchSize = ${{ parameters.PRJobBatchSize }}

eng/common/pipelines/templates/jobs/generate-job-matrix.yml:172

  • PRJobBatchSizeis declared as a YAMLnumber, which can include non-integer values (e.g. 2.5). The current logic only validates > 0and passes$batchSizethrough to-PackagesPerPRJob`, which is conceptually an integer count. Please enforce that the default value is an integer as well (e.g., by validating it’s a whole number and throwing a clear error if not), not only the override path. This prevents accidental fractional values from causing incorrect batching or downstream script errors.
            if ($batchSize -le 0) {
              throw "PR job batch size for ${{ pool.name }} must be greater than zero."
            }

@azure-sdk-automation
azure-sdk-automation Bot merged commit b870017 into main Aug 12, 2026
14 checks passed
@azure-sdk-automation
azure-sdk-automation Bot deleted the sync-eng-common-weikanglim/pr-job-batch-size-by-pool-16674 branch August 12, 2026 22:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Central-EngSys This issue is owned by the Engineering System team. EngSys This issue is impacting the engineering system.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants