Repository navigation
test(e2e): Tier 2 test for launcher.Provision (catches the #127/#130 class) - #133
Merged
Merged
Conversation
Substrate accepts malformed user-data (#127) and an empty KeyName (#130), so it missed both blockers that broke every headless launch. Add a real-AWS test (SPAWN_LIVE_PROVISION_TEST=1) that drives launcher.Provision exactly as lagotto does — keyless/SSM-only — and terminates the instance in a defer. Verified live: launched + terminated i-03c5aef4... in us-east-1, leak-checked clean. Skipped by default so CI is unaffected.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Replace the bespoke SPAWN_LIVE_PROVISION_TEST env gate with the existing e2e tier system: a //go:build e2e_tier2 test that drives launcher.Provision (the headless/keyless library path lagotto uses) and reuses the tier cleanup (terminate-by-name + reaper + TTL). Tier 0/substrate accepts the malformed user-data (#127) and empty KeyName (#130) that broke real launches, so this belongs at Tier 2 (single real instance) alongside the CLI-driven Tier 2 tests. Verified live: launched + terminated i-07b8d192..., leak-checked clean.
scttfrdmn
added a commit
that referenced
this pull request
Aug 10, 2026
truffle v0.49.0 (carrying #133 QuotaInfo.SpotUsage and #134 Capabilities.VCPUs) is now released, so this PR no longer needs the local-path replace directive. go.mod now pins the real tag; verified the full build/test suite (including TestCatalogValid and the new sweep-quota tests) against it, not the local checkout.
scttfrdmn
added a commit
that referenced
this pull request
Aug 10, 2026
…al quota (#493) * feat(launch): --max-concurrent-auto derives sweep concurrency from real quota The sweep orchestrator's wave mechanism (pkg/sweep + lambda/sweep-orchestrator) already polls active-instance count and launches min(available, remaining) -- a real batch/wait-for-room primitive. But its ceiling (state.MaxConcurrent) was always a number the caller had to already know, via --max-concurrent or the arbitrary default-10 fallback when a sweep auto-enables --detach. --max-concurrent-auto queries truffle's quota client for headroom (quota - current usage) per instance family, in the region the sweep is about to launch in, and converts vCPU headroom to an instance count via the real per-type vCPU count (truffle#134's new Capabilities.VCPUs, not a guessed size suffix). A heterogeneous sweep's derived ceiling is the MINIMUM across every distinct (instance type, spot/on-demand) combination present in the sweep, so a scarce family can't be silently outvoted by a roomier one. Real-world motivation: a 10-shard fleet launch with no concurrency guardrail hit an account's real ceiling (a G/VT Spot quota of 64 vCPUs, saturated by 8 running g7e.2xlarge instances) with zero prior warning; the actual launches then failed with MaxSpotInstanceCountExceeded. Not yet wired into `spawn resume`'s equivalent override -- tracked as a follow-up, since resume already has a recorded region and is a smaller retrofit. BLOCKED: go.mod carries a TEMPORARY local replace directive for truffle, since this code depends on truffle#133 (QuotaInfo.SpotUsage) and truffle#134 (Capabilities.VCPUs), both unreleased. Must be resolved to a real tag before merge. Fixes #492. * chore: drop temporary truffle replace, pin real v0.49.0 truffle v0.49.0 (carrying #133 QuotaInfo.SpotUsage and #134 Capabilities.VCPUs) is now released, so this PR no longer needs the local-path replace directive. go.mod now pins the real tag; verified the full build/test suite (including TestCatalogValid and the new sweep-quota tests) against it, not the local checkout.
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.
Tier 0 (substrate) accepts malformed user-data (#127) and an empty KeyName (#130) — so it green-lit both bugs that broke every headless launch. This adds a Tier 2 e2e test (
-tags=e2e_tier2) that driveslauncher.Provisiondirectly (the keyless/SSM-only library path lagotto's poller takes) against real AWS, and reuses the existing tier cleanup (terminate-by-name + reaper + TTL).Fits the existing tier system rather than a bespoke env gate: Tier 0 = substrate, Tiers 1–3 = real AWS by cost; a single real instance is Tier 2. It's the first library-level (vs CLI-binary) tier test.
Verified live twice (us-east-1, t3.small): launched → running → terminated, independently leak-checked clean each time. Excluded from the default build/CI by the build tag.