Skip to content

[Test] Buy capacity blocks when rendering test configs for manually scheduling tests on CB(p6-b200) - #7532

Merged
hehe7318 merged 6 commits into
aws:developfrom
hehe7318:wip/enable-b200-for-test-efa
Aug 7, 2026
Merged

[Test] Buy capacity blocks when rendering test configs for manually scheduling tests on CB(p6-b200)#7532
hehe7318 merged 6 commits into
aws:developfrom
hehe7318:wip/enable-b200-for-test-efa

Conversation

@hehe7318

@hehe7318 hehe7318 commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Description of changes

p6 capacity is only realistically obtainable through capacity blocks, which are an upfront, non-refundable purchase, so test_efa on p6-b200 cannot run in the daily integration tests. A *_CAPACITY_BLOCK_* variable now resolves like the existing *_CAPACITY_RESERVATION_* ones, except it finds or buys a capacity block and renders to its AZ, so the tests run wherever the capacity turned out to be.

A block already owned is reused whatever its state and however little is left of it: it is paid for either way, and a replacement would expire at the same time. Otherwise only 'instant' blocks up to a day long are bought, since blocks end at 11:30 UTC and are priced pro-rata, and rendering then waits for the block to become active.

Config validation renders every file under configs/ and must not spend money, hence PCLUSTER_SKIP_CAPACITY_BLOCK_PURCHASE, set by the validate-test-configs tox environment.

Tests

  • Ongoing

Checklist

  • Make sure you are pointing to the right branch.
  • If you're creating a patch for a branch other than develop add the branch name as prefix in the PR title (e.g. [release-3.6]).
  • Check all commits' messages are clear, describing what and why vs how.
  • Make sure to have added unit tests or integration tests to cover the new/modified code.
  • Check if documentation is impacted by this change.

Please review the guidelines for contributing and Pull Request Instructions.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

p6 capacity is only realistically obtainable through capacity blocks, which are
an upfront, non-refundable purchase, so test_efa on p6-b200 cannot run in the
daily integration tests. A '*_CAPACITY_BLOCK_*' variable now resolves like the
existing '*_CAPACITY_RESERVATION_*' ones, except it finds or buys a capacity
block and renders to its AZ, so the tests run wherever the capacity turned out
to be.

A block already owned is reused whatever its state and however little is left of
it: it is paid for either way, and a replacement would expire at the same time.
Otherwise only 'instant' blocks up to a day long are bought, since blocks end at
11:30 UTC and are priced pro-rata, and rendering then waits for the block to
become active.

Config validation renders every file under configs/ and must not spend money,
hence PCLUSTER_SKIP_CAPACITY_BLOCK_PURCHASE, set by the validate-test-configs
tox environment.
@hehe7318
hehe7318 requested review from a team as code owners August 6, 2026 20:08
@hehe7318 hehe7318 added skip-changelog-update Disables the check that enforces changelog updates in PRs 3.x labels Aug 6, 2026
@hehe7318 hehe7318 changed the title [Test] Buy capacity blocks when rendering test configs [Test] Buy capacity blocks when rendering test configs for manually scheduling tests on CB(p6-b200) Aug 6, 2026
hanwen-cluster
hanwen-cluster previously approved these changes Aug 6, 2026
hanwen-cluster and others added 3 commits August 7, 2026 07:10
PurchaseCapacityBlock answers before the block has been allocated, so the
reservation it returns has no AvailabilityZoneId yet. Taking the AZ from that
response therefore yielded None, which the caller read as 'no capacity in this
region': it moved on to the remaining regions, found nothing, and failed — after
the block had been bought, waited for, and seen active. The purchase was wasted.

Wait for the block to become active first, and take the AZ from that
DescribeCapacityReservations call, which does report it.
@hehe7318
hehe7318 merged commit cc73190 into aws:develop Aug 7, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3.x skip-changelog-update Disables the check that enforces changelog updates in PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants