Skip to content

fix(cli): removing region#796

Closed
xav-db wants to merge 1 commit intodevfrom
removing-region-from-cli
Closed

fix(cli): removing region#796
xav-db wants to merge 1 commit intodevfrom
removing-region-from-cli

Conversation

@xav-db
Copy link
Member

@xav-db xav-db commented Jan 12, 2026

Greptile Overview

Greptile Summary

This PR removes the region parameter from Helix Cloud deployment configuration across the CLI. The changes are well-executed and consistent across all affected files.

What Changed

  • CLI Interface: Removed the --region flag from helix init cloud and helix create-cluster commands
  • Interactive Prompts: Removed the Region enum and select_region() function that previously prompted users to choose between us-east-1, us-west-2, eu-west-1, and ap-southeast-1
  • Configuration: New Helix Cloud instances now have region: None instead of defaulting to "us-east-1"
  • Backward Compatibility: The region field remains in CloudInstanceConfig as Option<String> to support existing configurations

Code Quality

The implementation is clean and thorough:

  • All function signatures updated consistently across 7 files
  • The region field is properly preserved when updating existing configurations (see create_cluster.rs line 130)
  • No dead code left behind - the entire region selection flow was cleanly removed
  • Backward compatibility maintained through #[serde(default)] annotation

Issue Found

One documentation file needs updating: TESTING.md still references the removed --cloud-region flag (line 44).

Important Files Changed

File Analysis

Filename Score Overview
helix-cli/src/lib.rs 5/5 Cleanly removed region field from CloudDeploymentTypeCommand::Helix enum variant
helix-cli/src/main.rs 5/5 Removed region parameter from CreateCluster command definition and usage
helix-cli/src/prompts.rs 5/5 Removed Region enum, select_region function, and all region selection prompts
helix-cli/src/commands/integrations/helix.rs 5/5 Updated create_instance_config to set region to None, removed region parameter
helix-cli/src/commands/create_cluster.rs 5/5 Removed region parameter from function, removed region defaulting logic and output message, preserves existing region from configs
helix-cli/src/commands/add.rs 5/5 Updated calls to create_instance_config and create_cluster::run to not pass region
helix-cli/src/commands/init.rs 5/5 Updated calls to create_instance_config and create_cluster::run to not pass region

Sequence Diagram

sequenceDiagram
    participant User
    participant CLI as helix init/add
    participant Prompts as prompts.rs
    participant Helix as helix.rs
    participant CreateCluster as create_cluster.rs
    participant Config as helix.toml

    User->>CLI: helix init cloud
    CLI->>Prompts: build_init_deployment_command()
    Note over Prompts: NO LONGER prompts<br/>for region selection
    Prompts-->>CLI: CloudDeploymentTypeCommand::Helix
    CLI->>Helix: create_instance_config(name)
    Note over Helix: Sets region: None<br/>(was region: Some(selected))
    Helix-->>CLI: CloudInstanceConfig
    CLI->>Config: Save config with region: None
    CLI->>CreateCluster: run(instance_name)
    Note over CreateCluster: No region parameter<br/>(was region: Option<String>)
    CreateCluster->>CreateCluster: Preserve existing region if any
    CreateCluster->>Config: Update with cluster_id
    CreateCluster-->>CLI: Success
    CLI-->>User: Cluster created (no region displayed)
Loading

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.

1 file reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 12, 2026

Additional Comments (1)

helix-cli/TESTING.md
This test case references the --cloud-region flag which has been removed in this PR. This line should be updated to remove the region-related test case.

- `helix init cloud` with cloud instance; verify cloud instance configured in helix.toml
Prompt To Fix With AI
This is a comment left during a code review.
Path: helix-cli/TESTING.md
Line: 44:44

Comment:
This test case references the `--cloud-region` flag which has been removed in this PR. This line should be updated to remove the region-related test case.

```suggestion
- `helix init cloud` with cloud instance; verify cloud instance configured in helix.toml
```

How can I resolve this? If you propose a fix, please make it concise.

@xav-db xav-db closed this Jan 12, 2026
@xav-db xav-db deleted the removing-region-from-cli branch January 29, 2026 09:44
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