fix: [ENG-2206] make --type optional if --cluster or --colocate is passed#184
Conversation
Co-authored-by: danieltaox <danieltaox@gmail.com>
|
Cursor Agent can help with this pull request. Just |
Changed Files
|
Co-authored-by: danieltaox <danieltaox@gmail.com>
There was a problem hiding this comment.
Greptile Summary
This PR makes the --type parameter mandatory for the sf buy command and updates the CLI accordingly. The key changes include:
-
Command Interface Changes: The
sf buycommand now requires users to explicitly specify--type(e.g.,h100v) or use alternative specification methods like--zone,--cluster, or--colocate. The previous behavior of defaulting toh100iwhen no type was specified has been removed. -
Help Text Updates: All examples in the help text now include
--type h100vto reflect the new mandatory requirement, ensuring users understand the correct usage pattern. -
Schema Cleanup: The OpenAPI schema (
schema.ts) has been significantly streamlined by removing approximately 1,700 lines of admin-specific endpoints and schemas. This focuses the CLI on user-facing functionality and removes administrative operations that aren't relevant to typical CLI users. -
Version Bump: The package version has been incremented from 0.19.13 to 0.20.0, following semantic versioning conventions for breaking changes.
-
Type Safety Improvements: The TypeScript interfaces have been updated to make
instance_typeoptional in contexts where alternative specification methods are used, improving type safety while maintaining flexibility.
The changes integrate well with the existing codebase architecture, maintaining the same command structure while enforcing more explicit parameter specification. The schema cleanup aligns with a broader effort to separate admin functionality from user-facing CLI operations.
Confidence score: 4/5
- This PR introduces a breaking change that could affect existing scripts and workflows that relied on the implicit
h100idefault - Score reflects the potential for user impact due to the mandatory parameter change, though the implementation appears technically sound
- Pay close attention to
src/lib/buy/index.tsxfor the validation logic changes and ensure backwards compatibility considerations are addressed
3 files reviewed, no comments
--type optional if --cluster or --colocate is passed
… is passed (#184) Co-authored-by: danieltaox <danieltaox@gmail.com> Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>
Add
--type h100vtosf buyexamples because the parameter is now mandatory.Realized that --cluster and --colocate should overwrite --type instead of specifying an intersection. Makes the cli changes necessary for this shaved yak to work.
Slack Thread