Repository navigation
Refuse --os windows without --ami; label Windows rates as a lower bound (#884) - #890
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
scttfrdmn
force-pushed
the
fix/884-windows-launch-preview
branch
from
October 13, 2026 19:40
61df306 to
37a1f28
Compare
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.
Closes #884
1.
--os windowswith an auto-detected AMI is refused. Auto-detection only ever returns Amazon Linux 2023. Before this, the launch booted Linux while the preview, the spored readiness check and the Windows guards all treated it as Windows. The check lives inensureAMIAndPreflight, which both real launches and--dry-rungo through, so it fires before anything is created. spawn doesn't pick a Windows version for you (2022 vs 2025, Base vs Core, BYOL). Instead, the error names/aws/service/ami-windows-latest/Windows_Server-2025-English-Full-Base; I checked that it resolves (us-east-1 →ami-00d8aa800578d8b12). The headlesspkg/launcher.Provisionalready refuses Windows outright, and the docs always pass--ami, so this only affects the CLI.2. Windows rates are labelled as a lower bound. truffle prices Linux only. For m7i.xlarge in us-east-1 the Price List API gives $0.2016/hr Linux vs $0.3856/hr Windows, so the preview was 48% low.
--dry-run(table and-o json, new fieldprice_is_lower_bound) and--estimate-onlynow say the figure excludes the Windows licence.--estimate-onlyresolves no AMI, so it gets the OS from--os, or from an explicit--ami's platform. Real Windows pricing: spore-host/truffle#185.Gates (
cmd/windows_launch_preview_test.go). I reverted each one in a way that still compiles, and each failed:runLaunchDryRunfor AMI""/auto/AUTO(revert:&& falseon the guard call)runLaunchDryRunwith a stubbed price (revert:&& falseon render; flag computed from"")&& false)--estimate-onlycall passesestimateTargetOS(...)(revert:config.TargetOS, which is always""on that path)estimateTargetOSnever passes"auto"to DescribeImages (revert:&& falseon the auto check)make checkgreen; semgrep clean on the changed files.