Repository navigation
feat: launch into a Capacity Reservation / Capacity Block (#216) - #218
Merged
Merged
Conversation
Wires the previously-dead reservation flags through to RunInstances: - --reservation-id <id> → LaunchConfig.ReservationID → RunInstances CapacityReservationSpecification.CapacityReservationTarget. - --capacity-block → LaunchConfig.CapacityBlock → InstanceMarketOptions MarketType=capacity-block (Capacity Block consume). - truffleInput.ReservationID is now copied into config (was parsed but dropped — same silently-dropped-field class as lagotto#19). - Guards: --capacity-block requires --reservation-id; --capacity-block and --spot are mutually exclusive (different market options). - Reservation is AZ-pinned; caller matches --az. Also pin [email protected] in the security workflow — v1.4.0 panics on generics (ForEachElement / *types.TypeParam), crashing the scan. Tests: buildLaunchConfig reservation wiring + guards + truffle-copy regression. Closes #216
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #216. Step 2 of the Capacity Blocks for ML flow (find → purchase → launch).
Change
Wires the previously-dead reservation flags all the way through to
RunInstances:--reservation-id <id>→LaunchConfig.ReservationID→RunInstancesCapacityReservationSpecification.CapacityReservationTarget.CapacityReservationId.--capacity-block→LaunchConfig.CapacityBlock→InstanceMarketOptions{MarketType: capacity-block}(the Capacity Block consume).truffleInput.ReservationID(JSONreservation_id) is now copied into config — it was parsed but silently dropped (same class as lagotto#19).Before this, all of the above were defined but never read; launching into a reservation was impossible.
Guards
--capacity-blockrequires--reservation-id.--capacity-blockand--spotare mutually exclusive (differentInstanceMarketOptions).--azto the reservation's AZ (documented; reuses the [FSx] --fsx-create ignores --az: filesystem always lands in subnets[0], not the pinned AZ #208 AZ model).Tests
TestBuildLaunchConfig_Reservation(flag→config, capacity-block flag, both guards, clean-when-unset) andTestBuildLaunchConfig_TruffleReservationCopy(the dropped-field regression).go vet+cmd/pkg/awssuites green; gofmt clean.Also
Pins
[email protected]in.github/workflows/security.yml— v1.4.0 (what@latestnow resolves to) panics analyzing generics (ForEachElement called on type containing *types.TypeParam), crashing the scan rather than reporting a vuln. (Same fix landed in truffle#68.)Refs truffle#67 (discovery), spawn#217 (purchase), #208 (AZ co-location), lagotto#49 (schedule a launch at a Capacity Block's start time).