fix: [ENG-2120] [PRODUCT-541] handle breaking changes to alpha nodes API#170
Conversation
Changed Files
|
There was a problem hiding this comment.
Greptile Summary
This PR updates the CLI to handle breaking changes in the alpha nodes API by systematically replacing 'on-demand' node terminology with 'spot' nodes throughout the codebase. The changes include:
Dependency Update: The @sfcompute/nodes-sdk-alpha package is updated from version 0.1.0-alpha.5 to 0.1.0-alpha.7 in package.json, indicating compatibility with the new API version.
Terminology Standardization: All references to 'on-demand' nodes have been updated to 'spot' nodes across multiple files:
src/lib/nodes/utils.ts: Updated theprintNodeTypefunction to map 'spot' instead of 'on_demand'src/lib/nodes/list.tsx: Updated display logic, conditional checks, and user-facing text to use 'spot' terminologysrc/lib/nodes/create.ts: Updated error messages, comments, and API parameters to use 'spot' node typessrc/lib/nodes/index.ts: Updated help text to describe 'spot pricing' instead of 'on-demand pricing'src/lib/nodes/set.ts: Updated comments and error messages to reference 'spot nodes'
The terminology change aligns with common cloud computing patterns where 'spot' instances are preemptible/interruptible compute resources. All functional logic remains unchanged - spot nodes (formerly on-demand) still behave the same way with procurement-based pricing, no fixed duration, and the ability to be reclaimed by the provider. This is a coordinated update across the entire nodes module to maintain consistency with the updated API schema.
Confidence score: 5/5
- This PR is safe to merge with minimal risk as it consists entirely of terminology updates with no functional logic changes
- Score reflects straightforward string replacements and consistent application across all relevant files
- No files require special attention as all changes are cosmetic terminology updates
6 files reviewed, no comments
We've made some breaking changes to
v1/nodes(as we are allowed to, asv1/nodesis in Alpha testing and not yet GA, so we are not yet committed to non-breaking semantic changes yet).Updates CLI copy and API/SDK calls to handle this.