fix: [PRODUCT-601] deprecate sf extend#222
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
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 -colocommand 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
1 file reviewed, 1 comment
sf extendsf extend
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 extendinstead which explicitly behaves as expected.