Skip to content

spawn burst ignores --region, --profile and SPORE_REGION; it uses the ambient AWS config only #939

Closed

Description

@scttfrdmn

Found while fixing #924.

runBurst (cmd/burst.go) loads its AWS config with a bare config.LoadDefaultConfig(ctx), and registry.EnsureTable (pkg/registry/dynamodb.go) does the same. The root command records --region, --profile and --account through spawnconfig.SetSharedFlags (cmd/root.go), but nothing in the burst path reads them. launchParams.Region = cfg.Region is whatever the ambient chain (AWS_REGION or the shared AWS config) says. So:

  • spawn burst --region us-west-2 ... launches in the ambient region. The registry table and the members agree on that region, so nothing errors. They are just not where the user asked, and the members are not where local nodes configured for us-west-2 look for the table.
  • spawn burst --profile <p> and SPORE_REGION are ignored too.

This is the same shape as #276 (spawn launch --region ignored) and #774 (spawn autoscale --region), both fixed for their commands.

Cost relevance: instances launched in an unexpected region are easy to miss in spawn list filtered by region. The TTL reaper only covers regions where it is deployed.

Suggested: load burst's config through pkg/config.LoadComputeAWSConfig(ctx, spawnconfig.SharedRegion()) (or the helper spawn launch uses for region resolution), and give registry.EnsureTable an explicit aws.Config so the table is created in the same region the members launch into. Add a test that --region reaches LaunchParams.Region and the table client.

Verified by reading the code only. No instances were launched.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions