Skip to content

feat(ec2): cluster placement group actions (#344) - #350

Merged
scttfrdmn merged 1 commit into
mainfrom
feat/344-placement-groups
Jul 20, 2026
Merged

scttfrdmn merged 1 commit into
mainfrom
feat/344-placement-groups

Conversation

@scttfrdmn

Copy link
Copy Markdown
Owner

Unblocks spawn's MPI/HPC launch path (per-AZ lazy cluster placement groups) against Substrate.

Added

  • CreatePlacementGroup — GroupName + Strategy (default cluster); repeat create → InvalidPlacementGroup.Duplicate.
  • DescribePlacementGroups — GroupName.N filter; returns State=available (spawn polls for this before launching).
  • DeletePlacementGroup — removes by name; unknown → InvalidPlacementGroup.Unknown.
  • RunInstances — validates Placement.GroupName against known groups (unknown → InvalidPlacementGroup.Unknown), so the create → poll(available) → launch ordering is testable.

New EC2PlacementGroup type + generatePlacementGroupID / ec2PlacementGroupStateKey helpers.

Verification

TestEC2_PlacementGroups covers the full lifecycle: create → duplicate error → describe(available) → launch-into → launch-into-unknown(error) → delete → describe(empty) → delete-again(error). make test (race) + make lint clean. AWS shapes (placementGroupSet>item, error codes, Placement.GroupName) verified against the EC2 API reference. All API-observable state — squarely in substrate's scope.

Closes #344

Add CreatePlacementGroup / DescribePlacementGroups / DeletePlacementGroup and
validate RunInstances' Placement.GroupName, so spawn's per-AZ MPI launch path
(create → poll available → launch → delete on abandon) is testable end-to-end.

- CreatePlacementGroup: GroupName + Strategy (default cluster); duplicate →
  InvalidPlacementGroup.Duplicate.
- DescribePlacementGroups: GroupName.N filter; State=available.
- DeletePlacementGroup: unknown → InvalidPlacementGroup.Unknown.
- RunInstances: unknown Placement.GroupName → InvalidPlacementGroup.Unknown.

New EC2PlacementGroup type + generatePlacementGroupID/ec2PlacementGroupStateKey.
Regression test TestEC2_PlacementGroups covers the full lifecycle + error paths.
make test (race) + lint clean.

Closes #344
@scttfrdmn
scttfrdmn merged commit ad18d99 into main Jul 20, 2026
9 checks passed
@scttfrdmn
scttfrdmn deleted the feat/344-placement-groups branch July 20, 2026 20:46
@codecov

codecov Bot commented Jul 20, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.21978% with 18 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
emulator/ec2_plugin.go 79.31% 9 Missing and 9 partials ⚠️

📢 Thoughts on this report? Let us know!

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.

EC2: add cluster placement group actions (CreatePlacementGroup / DescribePlacementGroups / DeletePlacementGroup)

1 participant