You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
spawn resume: region-from-defaults type assertion panics if params file has no region default #495
paramFormat.Defaults["region"].(string) is an unchecked (non-, ok) type assertion. If the sweep's original parameter file has no top-level region in defaults (e.g. every param set set its own region individually, or the sweep only ever used the CLI's --region flag rather than a param-file default), Defaults["region"] is nil, and nil.(string)panics rather than falling through to the region == "" → "us-east-1" fallback below it.
The panic is reachable only when state.Instances has at least one entry with a non-empty InstanceID (i.e. at least one instance was actually launched before the sweep was interrupted) AND the param file's defaults map has no region key or a non-string one — otherwise the loop body never runs and the region == "" fallback below correctly applies.
Ask
Use the checked form (region, _ = paramFormat.Defaults["region"].(string)), or better, derive region the same way the rest of the per-config logic already does (buildLaunchConfigFromParams's per-entry region, falling back through defaults) rather than reaching into Defaults directly and assuming a top-level scalar. Worth checking whether state.Instances[i]'s own recorded config/tags could just carry the region it actually used, removing the guesswork entirely.
Not filed as blocking anything — spawn resume's existing --max-concurrent path has lived with this since before #492/#494; flagging it now because #494's --max-concurrent-auto makes correctness of region matter more (a wrong/panicked region means a wrong quota answer, not just a wrong ListInstances region filter).
Activity
fix(connect,resume): one wake path for stopped/hibernated/stopping; r…
fix(connect,resume): one wake path for stopped/hibernated/stopping; r…
fix(connect,resume): one wake path for stopped/hibernated/stopping; r…