Skip to content

add cluster option to buy#109

Merged
Sladuca merged 5 commits into
mainfrom
seb/cluster
Apr 11, 2025
Merged

add cluster option to buy#109
Sladuca merged 5 commits into
mainfrom
seb/cluster

Conversation

@Sladuca
Copy link
Copy Markdown
Contributor

@Sladuca Sladuca commented Apr 11, 2025

add ability to buy on a specific cluster

@semanticdiff-com
Copy link
Copy Markdown

semanticdiff-com Bot commented Apr 11, 2025

Review changes with  SemanticDiff

Changed Files
File Status
  .vscode/extensions.json  100% smaller
  src/lib/ConfirmInput.tsx  100% smaller
  src/lib/contracts/ContractDisplay.tsx  100% smaller
  src/lib/contracts/index.tsx  100% smaller
  src/lib/orders/OrderDisplay.tsx  100% smaller
  src/lib/sell/index.tsx  100% smaller
  src/lib/tokens.ts  100% smaller
  src/lib/updown.tsx  100% smaller
  src/lib/vm.ts  100% smaller
  src/schema.ts  100% smaller
  src/lib/buy/index.tsx  63% smaller
  deno.lock Unsupported file format
  src/lib/app-banner.ts  0% smaller
  src/lib/posthog.ts  0% smaller

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.

PR Summary

This PR adds a new --cluster option to the sf buy command, allowing users to specify a target cluster for their GPU purchase orders.

  • Added -c, --cluster <cluster> option to the buy command registration in src/lib/buy/index.tsx
  • Updated the getQuote function to accept and pass the cluster parameter to the API
  • Modified the placeBuyOrder function to include the cluster parameter in the request body
  • There's a bug where the cluster option is not properly passed from QuoteAndBuy component to the BuyOrder component props
  • The cluster parameter is correctly included in the API request body but missing from the orderProps object that's passed to the BuyOrder component

Greptile AI: The PR adds a new --cluster option to the sf buy command, allowing users to target specific clusters for their GPU purchase orders.

  • Added -c, --cluster <cluster> option in the command registration with proper documentation
  • Updated getQuote function to accept and forward the cluster parameter to the API
  • Modified placeBuyOrder function to include cluster in the request body
  • Bug: The cluster option is extracted in QuoteAndBuy component but not passed to the BuyOrder component props
  • The cluster parameter needs to be added to the orderProps object in the QuoteAndBuy component's useEffect hook

1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile

@Sladuca Sladuca merged commit 6f51aaa into main Apr 11, 2025
1 check passed
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.

1 participant