Skip to content

--estimate-only skips #110 constraint validation; should dry-run it before the cost estimate #124

Closed

Description

@scttfrdmn

Summary

--estimate-only skips the pre-flight instance-type constraint validation added in #110 (PR #111). It prints a cost estimate even for a configuration that would fail validation at real launch, so it can't be used to "dry-run" whether a launch is viable.

Reproduction (spawn v0.43.0)

$ spawn launch test --instance-type t3.micro --efa --region us-west-2 --estimate-only
💰 Cost estimate for t3.micro in us-west-2
   On-demand:  $0.0104/hr
✅ Estimate complete — no instances launched (--estimate-only)

t3.micro has no EFA support, so a real launch should fail #110 validation — but --estimate-only reports success.

Expected

--estimate-only should run the same constraint validation (EFA / hibernation / MPI / placement-group) as a real launch, before the cost estimate, and surface the same actionable error. That makes --estimate-only a true dry-run: "would this launch succeed, and what would it cost?"

This is the natural place users reach for to validate a config without spending money — having validation only on the real launch path means the cheapest way to test a constraint is to actually attempt a launch (which is exactly what you want --estimate-only to avoid).

Context

Found while verifying #110 in v0.43.0. The fix itself works on the real launch path; this is just that --estimate-only bypasses it. Minor, but it's the flag you'd use to check constraints safely.

Activity

  1. added
    enhancement
    on Jun 12, 2026
  2. scttfrdmn commented on Jun 13, 2026

    @scttfrdmn
    ContributorAuthor

    Verified fixed in spawn v0.45.1. --estimate-only now runs constraint validation before the estimate — EFA on t3.micro fails fast with an actionable error and non-zero exit:

    $ spawn launch test --instance-type t3.micro --efa --region us-west-2 --estimate-only
    instance type "t3.micro" does not support EFA (required for --efa).
           Find EFA-capable types: truffle find "t3*" efa  (e.g. c5n.18xlarge, hpc6a.48xlarge)
    $ echo $?
    1
    

    True dry-run now. 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions