Skip to content

Bound per-matrix concurrency in integration test workflows - #2231

Open
olowosulu wants to merge 2 commits into
aws:mainfrom
olowosulu:fix/matrix-wave-splitting
Open

Bound per-matrix concurrency in integration test workflows#2231
olowosulu wants to merge 2 commits into
aws:mainfrom
olowosulu:fix/matrix-wave-splitting

Conversation

@olowosulu

@olowosulu olowosulu commented Aug 4, 2026

Copy link
Copy Markdown

Summary

Adds max-parallel: 100 to the 13 matrix job definitions in the integration test
workflows, bounding how many jobs from any single matrix run concurrently.

This is defensive hardening rather than a fix for a diagnosed failure. I want to be
upfront about the evidence, because the strength of the argument varies by claim.

What the change does

strategy:
  fail-fast: false
  # Cap concurrent jobs per matrix to limit simultaneous STS AssumeRoleWithWebIdentity calls.
  # 100 is a conservative value, not calibrated against throttle data; account concurrency limits may cap lower.
  max-parallel: 100
  matrix: ${{ fromJson(needs.GenerateTestMatrix.outputs.ec2_linux_matrix) }}

Twelve sites in test-artifacts.yml and one in ec2-integration-test.yml. No other
changes, no deletions.

The argument I am confident in

The workflow dispatches on the order of 600 jobs. max-parallel is scoped per matrix
definition, so today any one matrix can request as much concurrency as it has jobs, and
a single large matrix can consume the account's shared runner pool at the expense of
others.

This is not hypothetical for the largest matrices. Public run history for run
30584015978 shows the EC2Linux-0 matrix generating 200 jobs and EC2Linux-1
generating 176. Those come from ec2-integration-test.yml, which is called nine times
from test-artifacts.yml. Capping at 100 measurably constrains those matrices and gives
fairer scheduling across the rest.

For matrices that generate fewer than 100 jobs the setting is inert, so the effect is
partial by design.

Verification

Both workflow files parse with yaml.safe_load, and 13 jobs carry the new key
(12 in test-artifacts.yml, 1 in ec2-integration-test.yml). The diff touches only
those two files.

With 600+ matrix jobs hitting STS AssumeRoleWithWebIdentity concurrently
against the same OIDC role, contention on the endpoint may cause throttled
requests. The credential action fetches a short-lived JWT (~5 min + 5 min
clock-skew grace) and retries AssumeRole with that same token. If retries
are delayed long enough, the token can expire before a successful call.

Setting max-parallel: 100 limits concurrent STS calls per matrix. The
value is not calibrated against measured throttle data; it is a
conservative cap based on the reasoning above. The platform concurrency
limit for the account may already cap below 100.
@olowosulu
olowosulu requested a review from a team as a code owner August 4, 2026 09:34
strategy:
fail-fast: false
# Cap concurrent jobs per matrix to limit simultaneous STS AssumeRoleWithWebIdentity calls.
# 100 is a conservative value, not calibrated against throttle data; account concurrency limits may cap lower.

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.

nit - "account concurrency limits" reads as an AWS quota here; worth naming the GitHub runner concurrency limit explicitly?

fail-fast: false
# Cap concurrent jobs per matrix to limit simultaneous STS AssumeRoleWithWebIdentity calls.
# 100 is a conservative value, not calibrated against throttle data; account concurrency limits may cap lower.
max-parallel: 100

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.

nit - this matrix resolves to a single row today, so the cap is inert here — worth saying so in the comment?

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.

2 participants