Skip to content

Sync eng/common directory with azure-sdk-tools for PR 16621 - #7282

Open
azure-sdk-automation[bot] wants to merge 3 commits into
mainfrom
sync-eng-common-fix/regenerate-matrix-drops-packages-16621
Open

Sync eng/common directory with azure-sdk-tools for PR 16621#7282
azure-sdk-automation[bot] wants to merge 3 commits into
mainfrom
sync-eng-common-fix/regenerate-matrix-drops-packages-16621

Conversation

@azure-sdk-automation

Copy link
Copy Markdown
Contributor

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

Wei Hu (live1206) and others added 2 commits July 29, 2026 05:03
Split-Items computed the number of oversized groups as
$itemCount % $itemsPerGroup instead of $itemCount % $JobCount. Since
$itemsPerGroup is the group size and not the group count, the remainder
is taken over the wrong quantity, and whenever

  $itemCount % $itemsPerGroup -lt $itemCount % $JobCount

too few groups are widened. The generated groups then hold fewer items
than were passed in, and the trailing items are silently omitted from
the matrix. Nothing fails, so those packages simply never get
regenerated.

The azure-sdk-for-net mgmt regeneration pipeline hits this: 230 packages
across 18 jobs produces groups summing to 218, dropping the last 12
packages including Azure.ResourceManager.AppService. This is visible in
the emitted job keys, where the final key is se_st_17 (ending at
"storagediscovery") rather than st_wo_17.

The bug was easy to miss because the worked example in the comment above
the function, 22 items into 5 jobs, happens to give the same answer under
both formulas: 22 % 4 and 22 % 5 are both 2.

Verified over all item counts 1..300 against job counts 1..30 (9000
combinations): before the fix 408 combinations lost items, after it none
do, every input item appears exactly once, and group sizes still differ
by at most one.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Both parameters are used as divisors when splitting items, so passing 0
or a negative value failed with "Attempted to divide by zero" or
"Arithmetic operation resulted in an overflow" from inside Split-Items
rather than with a message naming the bad parameter.

Use ValidateRange so the failure happens at parameter binding, matching
the declarative validation attributes already used across these scripts.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings August 5, 2026 03:32
@azure-sdk-automation
azure-sdk-automation Bot requested a review from a team as a code owner August 5, 2026 03:32
@azure-sdk-automation
azure-sdk-automation Bot requested review from Wei Hu (live1206) and removed request for Copilot August 5, 2026 03:32
@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 5, 2026
@azure-pipelines

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

@live1206

Copy link
Copy Markdown
Member

Copilot please merge latest main to this

…egenerate-matrix-drops-packages-16621

Co-authored-by: live1206 <5196139+live1206@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings August 6, 2026 02:19
@azure-sdk-automation
azure-sdk-automation Bot removed the request for review from Copilot August 6, 2026 02:19

Copilot AI commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Copilot please merge latest main to this

Merged the latest main in def4d892.

- by copilot

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.

2 participants