Repository navigation
test(e2e): cost-control safety net for real-AWS tiers (#47) - #48
Merged
Merged
Conversation
A Tier 1 leak-check found 67 leftover e2e instances in spore-host-dev (one running 12 days) from prior Tier 2/3 runs whose cleanup failed. For an ephemeral-infra project, leaked instances are an existential bug. Defense in depth so a leak can't survive a run: - reaper.go: TestMain (real-AWS tiers only) reaps any e2e-* instance older than 30m across us-east-1/us-east-2 before AND after the suite — so a killed/timed-out run that skips t.Cleanup is healed by the next run. - TestTier1_NoLeakedInstances: API-only guard that FAILS the build if any e2e-* instance outlives the threshold. Silent leakage → red build. - tier3: cleanups now 'terminate --yes', not 'stop' (stopping leaked EBS-charged instances indefinitely — the bulk of the 67). - helpers: corrected terminateByName's misleading 'stops' comment (it already terminates). - tier1: lagotto cancel cleanup/step now pass -y (cancel prompts after spawn#40; closed stdin would EOF→abort and leak the watch). Verified against real AWS (spore-host-dev): full Tier 1 green, reaper runs, leak-check reports 'cost control intact', 0 e2e instances remain. Refs #47
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 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.
Refs #47. Makes the real-AWS test tiers safe to run — the prerequisite for Tier 2/3.
Why
Running Tier 1 against real AWS surfaced 67 leftover e2e instances in spore-host-dev from prior Tier 2/3 runs whose cleanup had failed — one running 12 days, ~54 stopped accruing EBS. For an ephemeral-infra / cost-control project, that's an existential bug. (All 67 terminated manually.)
Defense in depth
reaper.go, real-AWS tiers only)TestMainterminates anye2e-*instance older than 30m across us-east-1/us-east-2 before and after every run. Heals leaks from killed/timed-out runs wheret.Cleanupnever fires.TestTier1_NoLeakedInstances)e2e-*instance outlives the threshold. Silent leakage → red build.stop→terminate --yes. Stopping leaked EBS-charged instances forever — the bulk of the 67.terminateByNamealready terminates; corrected its misleading "stops" doc.lagotto cancelcleanup/step now pass-y(cancel prompts after #40; closed stdin would EOF→abort and leak the watch).Verified against real AWS (spore-host-dev)
Full Tier 1 suite green (~49s), reaper runs each phase, leak-check reports "cost control intact", and an independent
describe-instancesconfirms 0 e2e instances remain. Tier 0 (substrate) deliberately excluded from the reaper build tag.Does not fully close #47 — the reaper + leak-check are the prevention; remaining items there (tagging scheme, applying to all Tier 2/3 launch paths) land when we do the Tier 2/3 work, now that it's safe to run.