Skip to content

fix: [ENG-2206] make --type optional if --cluster or --colocate is passed#184

Merged
sigmachirality merged 6 commits into
mainfrom
cursor/add-type-h100v-to-sf-buy-examples-d1a3
Aug 29, 2025
Merged

fix: [ENG-2206] make --type optional if --cluster or --colocate is passed#184
sigmachirality merged 6 commits into
mainfrom
cursor/add-type-h100v-to-sf-buy-examples-d1a3

Conversation

@sigmachirality
Copy link
Copy Markdown
Member

@sigmachirality sigmachirality commented Aug 27, 2025

Add --type h100v to sf buy examples 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

Open in Cursor Open in Web

Co-authored-by: danieltaox <danieltaox@gmail.com>
@cursor
Copy link
Copy Markdown

cursor Bot commented Aug 27, 2025

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@semanticdiff-com
Copy link
Copy Markdown

semanticdiff-com Bot commented Aug 27, 2025

Review changes with  SemanticDiff

Changed Files
File Status
  src/lib/buy/index.tsx  51% smaller
  src/schema.ts  1% smaller
  package.json  0% smaller

@sigmachirality sigmachirality marked this pull request as ready for review August 28, 2025 20:55
Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Greptile Summary

This PR makes the --type parameter mandatory for the sf buy command and updates the CLI accordingly. The key changes include:

  1. Command Interface Changes: The sf buy command 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 to h100i when no type was specified has been removed.

  2. Help Text Updates: All examples in the help text now include --type h100v to reflect the new mandatory requirement, ensuring users understand the correct usage pattern.

  3. 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.

  4. Version Bump: The package version has been incremented from 0.19.13 to 0.20.0, following semantic versioning conventions for breaking changes.

  5. Type Safety Improvements: The TypeScript interfaces have been updated to make instance_type optional 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 h100i default
  • 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.tsx for the validation logic changes and ensure backwards compatibility considerations are addressed

3 files reviewed, no comments

Edit Code Review Bot Settings | Greptile

@sigmachirality sigmachirality changed the title Add --type h100v to sf buy examples fix: [ENG-2206] make --type optional if --cluster or --colocate is passed Aug 28, 2025
@sigmachirality sigmachirality merged commit 0c455ce into main Aug 29, 2025
1 check passed
@sigmachirality sigmachirality deleted the cursor/add-type-h100v-to-sf-buy-examples-d1a3 branch August 29, 2025 23:24
sigmachirality added a commit that referenced this pull request Sep 15, 2025
… 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants