Skip to content

Conversation

@sigmachirality
Copy link
Member

Customers often are confused about the guarantees and lack of guarantees provided by sf extend. Unfortunately, sf extend cannot work as many customers expect because contracts do not map 1 to 1 with specific nodes. Deprecate this command and suggest the user use the underlying command this syntactic sugar wrapped (sf buy --colocate) and or use sf nodes extend instead which explicitly behaves as expected.

Screenshot 2025-10-31 at 8 10 58 PM

@semanticdiff-com
Copy link

semanticdiff-com bot commented Nov 1, 2025

Review changes with  SemanticDiff

Changed Files
File Status
  src/lib/extend/index.tsx  11% smaller
  deno.lock Unsupported file format

Copy link
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 Overview

Greptile Summary

This PR deprecates the sf extend command by replacing its implementation with a deprecation notice that directs users to alternative commands (sf nodes extend or sf buy -colo).

Key changes:

  • Removed all functional logic (contract fetching, validation, React components)
  • Added deprecation message displayed both in help text and when command is executed
  • Builds equivalent sf buy -colo command dynamically based on provided options
  • Command now exits immediately with deprecation message instead of executing

Issues found:

  • The deprecated command is still referenced in src/lib/clusters/clusters.tsx:149, where it's shown as an example for extending clusters. This needs to be updated to use the new recommended approach.

Confidence Score: 3/5

  • This PR is safe to merge but has one reference that needs updating
  • The deprecation implementation is correct and will prevent users from running the old command, but there's a stale reference in clusters.tsx that still recommends the deprecated command. This should be fixed before merging to avoid user confusion.
  • Check src/lib/clusters/clusters.tsx - it still references the deprecated command

Important Files Changed

File Analysis

Filename Score Overview
src/lib/extend/index.tsx 3/5 Deprecated sf extend command with clear deprecation message, but one reference in clusters.tsx still uses the old command

Sequence Diagram

sequenceDiagram
    participant User
    participant CLI as sf extend
    participant Console
    
    User->>CLI: sf extend --contract <id> --duration 1h
    CLI->>CLI: Build equivalent sf buy command
    CLI->>Console: Display deprecation message with equivalent command
    CLI->>User: Exit with status 0
    
    Note over User,CLI: No API calls made<br/>No contract validation<br/>Command immediately exits
Loading

1 file reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

@sigmachirality sigmachirality changed the title fix: deprecate sf extend fix: [PRODUCT-601] deprecate sf extend Nov 1, 2025
@sigmachirality sigmachirality merged commit 17eb02d into main Nov 1, 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.

2 participants