feat(find): add --show-price flag (#50)#103
Merged
Merged
Conversation
find had no --show-price — only the deprecated search (which #44 merged into find) and the spot-centric spot command exposed pricing, so the canonical 'what does this cost' question couldn't be answered with the canonical search command. Add --show-price to find, populating the on-demand $/hr column via awsClient.OnDemandPrice (SageMaker ml.* keeps its management-premium rate). Composes with --regions. Default output is unchanged (no price column). Mirrors the old search behavior. Test: TestFindCommand_Flags asserts the flag; docs-gen/find.md regenerated (drift gate). Closes #50
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
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 #50.
truffle findhad no--show-price— only the deprecatedsearch(which #44 merged intofind) and the spot-centricspotcommand exposed on-demand pricing. So the canonical "what does this instance cost" question couldn't be answered with the canonical search command; you had to fall back tospotor the raw AWS Pricing API.Change
--show-pricetofind, populating the on-demand$/hrcolumn viaawsClient.OnDemandPrice(SageMakerml.*types keep their AmazonSageMaker management-premium rate). Composes with--regionsso price shows per region.--show-priceis passed.search --show-pricehad.Verify
Tested live (g5.12xlarge → $5.6720, exactly the issue's g5.4xlarge-vs-g5.12xlarge comparison use case).
TestFindCommand_Flagsasserts the flag;docs-gen/find.mdregenerated so the drift gate passes.