Repository navigation
fix(launch): treat --ami auto as auto-detect - #17
Merged
Merged
Conversation
The --help text said --ami 'auto-detects AL2023', but auto-detection only fired when --ami was empty; passing --ami auto sent the literal string to EC2 → InvalidAMIID.Malformed. Normalize --ami auto (any case) to empty at the flag-mapping stage so all downstream AMI gates auto-detect, plus a defense-in-depth guard in launchWithProgress. Update the flag help to document 'auto'. Closes #15.
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This was referenced Jun 3, 2026
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 #15.
spawn launch --helpsays--ami ... auto-detects AL2023, but auto-detection only fired when--amiwas empty. Passing--ami auto(as the help text implies you can) sent the literal"auto"to EC2 →InvalidAMIID.Malformed: Invalid id: "auto".Fix
--ami auto(case-insensitive) to empty at the flag-mapping stage inbuildLaunchConfig, so all downstream AMI-detection gates (single, sweep, batch) auto-detect."auto"as auto-detect at thelaunchWithProgressdetection gate.--amiflag help:AMI ID (ami-...); omit or use 'auto' to auto-detect the latest AL2023.Tests
TestBuildLaunchConfig_AMIAutoverifiesauto/AUTO/Auto→ empty (auto-detect) and a realami-*ID is preserved.go build,go vet,gofmt,go test ./cmd/pass.