Repository navigation
Description
Context
spawn launch --max-concurrent-auto (#492, shipped in v0.99.0) derives the parameter-sweep concurrency ceiling from the account's real AWS quota headroom instead of requiring the caller to already know it — closing a real gap where a fleet launch could hit an account's actual quota ceiling with zero prior warning.
spawn resume has the exact same class of gap and was deliberately left out of that PR as a follow-up (see spawn#493's description).
The gap
cmd/resume.go's --max-concurrent override is a plain user-typed int, same as launch's was before #492:
resumeCmd.Flags().IntVar(&resumeMaxConcurrent, "max-concurrent", 0, "Override max concurrent instances (0 = use original)")
...
if resumeMaxConcurrent > 0 {
maxConcurrent = resumeMaxConcurrent
}There's no --max-concurrent-auto equivalent — a caller resuming an interrupted sweep after hitting a quota wall has no way to ask spawn to re-derive a safe ceiling from current quota headroom; they have to guess a number themselves, same problem #492 fixed for the initial launch.
Why this should be an easier retrofit than #492 was
Unlike the initial launch path (which had to resolve region before it could even ask about quota), resume already has a resolved region on hand from the original launch:
- Foreground path:
state.Regionis loaded from the local sweep-state file (loadSweepState). - Detached path (
resumeSweepDetached):state.Regioncomes back fromsweep.QuerySweepStatusagainst the persistedSweepRecord(pkg/sweep/detached.go'sRegion stringfield).
So resuming doesn't need the region-auto-detect dance launch's --max-concurrent-auto handling does — it can go straight to quota lookup once state is loaded.
Ask
Add --max-concurrent-auto to spawn resume, reusing resolveAutoMaxConcurrent/sweepQuotaCombos from cmd/launch_sweep_quota.go (#492) rather than reimplementing quota derivation. The param sets needed for sweepQuotaCombos are already available from the reloaded parameter file (foreground path) or would need to come from the sweep's stored params (detached path — check what QuerySweepStatus/the DynamoDB record exposes).
Mutually exclusive with --max-concurrent, matching the validation launch already has.
Related
- Sweep orchestrator's --max-concurrent is user-typed, not quota-derived — no automatic wave sizing to fit a real account ceiling #492 (the original launch-path fix, shipped in spawn v0.99.0)
- truffle#132 / truffle's
Capabilities.VCPUs(the quota-headroom + vCPU-conversion primitives this would reuse, shipped in truffle v0.49.0)
Activity
Give spawn sweep resume --max-concurrent-auto, and gate deprecated co…
Give spawn sweep resume --max-concurrent-auto, and gate deprecated co…
Give spawn sweep resume --max-concurrent-auto, and gate deprecated co…