feat: [ENG-2395] sf nodes create accepts the --any-zone flag for --auto nodes#231
Merged
Conversation
Changed Files
|
Contributor
Greptile OverviewGreptile SummaryThis PR introduces a new
The implementation follows established CLI patterns using Commander.js conflicts() and maintains consistency with the existing codebase structure. This feature is currently feature-flagged for internal testing and provides users with greater flexibility for cost optimization and availability. Important Files Changed
Confidence score: 4/5
Sequence DiagramsequenceDiagram
participant User
participant CLI
participant PostHog
participant NodesClient as "Nodes SDK Client"
participant API as "SF Compute API"
User->>CLI: "sf nodes create --auto --any-zone -n 1 --max-price 12.50"
CLI->>PostHog: "Check feature flag 'custom-vm-images'"
PostHog-->>CLI: "Feature flag status"
CLI->>CLI: "Validate command options and arguments"
CLI->>CLI: "Hook preAction: validate any-zone with auto flag"
CLI->>NodesClient: "Create nodes client instance"
NodesClient-->>CLI: "Client ready"
CLI->>CLI: "Build NodeCreateParams with any_zone=true"
User->>CLI: "Confirm node creation"
CLI->>NodesClient: "nodes.create(createParams)"
NodesClient->>API: "POST /nodes with any_zone=true"
API-->>NodesClient: "Created nodes response"
NodesClient-->>CLI: "Nodes creation result"
CLI->>CLI: "Display success message and nodes table"
CLI->>User: "Show created nodes and next steps"
|
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
be3b97a to
2ac4c0b
Compare
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.
Allows users to specify a colocation strategy of
anywhereon their auto-reserved nodes if they don't care about which zone matching their requirements they land on each hour.Currently this flag is feature flagged for internal testing.