Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow --disk-tier to be None to remove the disk_tier setup in yaml #2906

Merged
merged 2 commits into from
Dec 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 21 additions & 20 deletions sky/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,13 +233,14 @@ def _interactive_node_cli_command(cli_func):
type=int,
required=False,
help=('OS disk size in GBs.'))
disk_tier = click.option('--disk-tier',
default=None,
type=click.Choice(['low', 'medium', 'high'],
case_sensitive=False),
required=False,
help=('OS disk tier. Could be one of "low", '
'"medium", "high". Default: medium'))
disk_tier = click.option(
'--disk-tier',
default=None,
type=click.Choice(['low', 'medium', 'high', 'none'],
case_sensitive=False),
required=False,
help=('OS disk tier. Could be one of "low", "medium", "high" or "none" '
'("none" for using the default value). Default: medium'))
ports = click.option(
'--ports',
required=False,
Expand Down Expand Up @@ -697,7 +698,10 @@ def _parse_override_params(
if disk_size is not None:
override_params['disk_size'] = disk_size
if disk_tier is not None:
override_params['disk_tier'] = disk_tier
if disk_tier.lower() == 'none':
override_params['disk_tier'] = None
else:
override_params['disk_tier'] = disk_tier
if ports:
override_params['ports'] = ports
return override_params
Expand Down Expand Up @@ -1303,11 +1307,10 @@ def cli():
@click.option(
'--disk-tier',
default=None,
type=click.Choice(['low', 'medium', 'high'], case_sensitive=False),
type=click.Choice(['low', 'medium', 'high', 'none'], case_sensitive=False),
required=False,
help=(
'OS disk tier. Could be one of "low", "medium", "high". Default: medium'
))
help=('OS disk tier. Could be one of "low", "medium", "high" or "none" '
'("none" for using the default value). Default: medium'))
@click.option(
'--idle-minutes-to-autostop',
'-i',
Expand Down Expand Up @@ -3797,11 +3800,10 @@ def spot():
@click.option(
'--disk-tier',
default=None,
type=click.Choice(['low', 'medium', 'high'], case_sensitive=False),
type=click.Choice(['low', 'medium', 'high', 'none'], case_sensitive=False),
required=False,
help=(
'OS disk tier. Could be one of "low", "medium", "high". Default: medium'
))
help=('OS disk tier. Could be one of "low", "medium", "high" or "none" '
'("none" for using the default value). Default: medium'))
@click.option(
'--detach-run',
'-d',
Expand Down Expand Up @@ -4651,11 +4653,10 @@ def _get_candidate_configs(yaml_path: str) -> Optional[List[Dict[str, str]]]:
@click.option(
'--disk-tier',
default=None,
type=click.Choice(['low', 'medium', 'high'], case_sensitive=False),
type=click.Choice(['low', 'medium', 'high', 'none'], case_sensitive=False),
required=False,
help=(
'OS disk tier. Could be one of "low", "medium", "high". Default: medium'
))
help=('OS disk tier. Could be one of "low", "medium", "high" or "none" '
'("none" for using the default value). Default: medium'))
@click.option(
'--idle-minutes-to-autostop',
'-i',
Expand Down