Skip to content

remove deprecations for 0.9.0 #5212

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

Merged
merged 6 commits into from
Apr 15, 2025
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions charts/skypilot/templates/ingress-nodeport.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{{- /* TODO(aylei): remove this template in v0.9.0 release */ -}}
{{- /* TODO(aylei): remove this template in v0.10.0 release */ -}}
{{- $createNodePort := false -}}
{{- if eq .Values.ingress.nodePortEnabled nil -}}
{{- /* Keep existing NodePort service if ingress.nodePortEnabled is not set */ -}}
{{- $existingService := lookup "v1" "Service" .Release.Namespace (printf "%s-ingress-controller-np" .Release.Name) -}}
{{- if $existingService -}}
{{- /* If there is an existing legacy NodePort service, error out and ask user to set ingress.nodePortEnabled explicitly */ -}}
{{- fail (printf "Service %s-ingress-controller-np is deprecated and will be removed in SkyPilot v0.9.0. Refer to https://docs.skypilot.co/en/latest/reference/api-server/api-server-admin-deploy.html#sky-migrate-legacy-service for migration steps." .Release.Name) -}}
{{- fail (printf "Service %s-ingress-controller-np is deprecated and will be removed in SkyPilot v0.10.0. Refer to https://docs.skypilot.co/en/latest/reference/api-server/api-server-admin-deploy.html#sky-migrate-legacy-service for migration steps." .Release.Name) -}}
{{- end -}}
{{- else -}}
{{- /* Use explicitly set value */ -}}
Expand Down
2 changes: 1 addition & 1 deletion charts/skypilot/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ ingress:
# It is recommended to keep only one endpoint by explicitly setting ingress.nodePortEnabled=false and swtich to ingress-nginx.controller.service.type
# if you are upgrading from 0.8.0 nightly.
# Deprecated: use ingress-nginx.controller.service.type=NodePort instead
# TODO(aylei): document the migration steps in v0.9.0 release note and remove these fields
# TODO(aylei): remove these fields in v0.10.0
nodePortEnabled: null
# Specific nodePort to use for the ingress controller
# If not set, Kubernetes will assign random ports in the NodePort range (default 30000-32767)
Expand Down
25 changes: 1 addition & 24 deletions sky/backends/cloud_vm_ray_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -439,18 +439,7 @@ def add_gang_scheduling_placement_group_and_setup(
pg = ray_util.placement_group({json.dumps(bundles)}, 'STRICT_SPREAD')
plural = 's' if {num_nodes} > 1 else ''
node_str = f'{num_nodes} node{{plural}}'

# We have this `INFO: Tip:` message only for backward
# compatibility, because if a cluster has the old SkyPilot version,
# it relies on this message to start log streaming.
# This message will be skipped for new clusters, because we use
# start_streaming_at for the `Waiting for task resources on`
# message.
# TODO: Remove this message in v0.9.0.
message = ('{ux_utils.INDENT_SYMBOL}{colorama.Style.DIM}INFO: '
'Tip: use Ctrl-C to exit log streaming, not kill '
'the job.{colorama.Style.RESET_ALL}\\n')
message += ('{ux_utils.INDENT_SYMBOL}{colorama.Style.DIM}'
message = ('{ux_utils.INDENT_SYMBOL}{colorama.Style.DIM}'
'Waiting for task resources on '
f'{{node_str}}.{colorama.Style.RESET_ALL}')
print(message, flush=True)
Expand Down Expand Up @@ -608,9 +597,6 @@ def add_ray_task(self,
textwrap.dedent(f"""\
sky_env_vars_dict = {{}}
sky_env_vars_dict['{constants.SKYPILOT_NODE_IPS}'] = job_ip_list_str
# Backward compatibility: Environment starting with `SKY_` is
# deprecated. Remove it in v0.9.0.
sky_env_vars_dict['SKY_NODE_IPS'] = job_ip_list_str
sky_env_vars_dict['{constants.SKYPILOT_NUM_NODES}'] = len(job_ip_rank_list)
""")
]
Expand Down Expand Up @@ -659,9 +645,6 @@ def add_ray_task(self,
if script is not None:
script += rclone_flush_script
sky_env_vars_dict['{constants.SKYPILOT_NUM_GPUS_PER_NODE}'] = {int(math.ceil(num_gpus))!r}
# Backward compatibility: Environment starting with `SKY_` is
# deprecated. Remove it in v0.9.0.
sky_env_vars_dict['SKY_NUM_GPUS_PER_NODE'] = {int(math.ceil(num_gpus))!r}

ip = gang_scheduling_id_to_ip[{gang_scheduling_id!r}]
rank = job_ip_rank_map[ip]
Expand All @@ -678,14 +661,8 @@ def add_ray_task(self,
name_str = f'{{node_name}}, rank={{rank}},'
log_path = os.path.expanduser(os.path.join({log_dir!r}, f'{{rank}}-{{node_name}}.log'))
sky_env_vars_dict['{constants.SKYPILOT_NODE_RANK}'] = rank
# Backward compatibility: Environment starting with `SKY_` is
# deprecated. Remove it in v0.9.0.
sky_env_vars_dict['SKY_NODE_RANK'] = rank

sky_env_vars_dict['SKYPILOT_INTERNAL_JOB_ID'] = {self.job_id}
# Backward compatibility: Environment starting with `SKY_` is
# deprecated. Remove it in v0.9.0.
sky_env_vars_dict['SKY_INTERNAL_JOB_ID'] = {self.job_id}

futures.append(run_bash_command_with_log \\
.options(name=name_str, {options_str}) \\
Expand Down
8 changes: 0 additions & 8 deletions sky/clouds/kubernetes.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ class Kubernetes(clouds.Cloud):
SKY_SSH_KEY_SECRET_NAME = 'sky-ssh-keys'
SKY_SSH_JUMP_NAME = 'sky-ssh-jump-pod'

LEGACY_SINGLETON_REGION = 'kubernetes'

# Limit the length of the cluster name to avoid exceeding the limit of 63
# characters for Kubernetes resources. We limit to 42 characters (63-21) to
# allow additional characters for creating ingress services to expose ports.
Expand Down Expand Up @@ -753,12 +751,6 @@ def instance_type_exists(self, instance_type: str) -> bool:
instance_type)

def validate_region_zone(self, region: Optional[str], zone: Optional[str]):
if region == self.LEGACY_SINGLETON_REGION:
# For backward compatibility, we allow the region to be set to the
# legacy singleton region.
# TODO: Remove this after 0.9.0.
return region, zone

if region == kubernetes.in_cluster_context_name():
# If running incluster, we set region to IN_CLUSTER_REGION
# since there is no context name available.
Expand Down
4 changes: 0 additions & 4 deletions sky/serve/load_balancing_policies.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@
# Define a registry for load balancing policies
LB_POLICIES = {}
DEFAULT_LB_POLICY = None
# Prior to #4439, the default policy was round_robin. We store the legacy
# default policy here to maintain backwards compatibility. Remove this after
# 2 minor release, i.e., 0.9.0.
LEGACY_DEFAULT_POLICY = 'round_robin'


def _request_repr(request: 'fastapi.Request') -> str:
Expand Down
6 changes: 0 additions & 6 deletions sky/serve/serve_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import colorama

from sky.serve import constants
from sky.serve import load_balancing_policies as lb_policies
from sky.utils import db_utils

if typing.TYPE_CHECKING:
Expand Down Expand Up @@ -335,11 +334,6 @@ def _get_service_from_row(row) -> Dict[str, Any]:
(current_version, name, controller_job_id, controller_port,
load_balancer_port, status, uptime, policy, _, _, requested_resources_str,
_, active_versions, load_balancing_policy, tls_encrypted) = row[:15]
if load_balancing_policy is None:
# This entry in database was added in #4439, and it will always be set
# to a str value. If it is None, it means it is an legacy entry and is
# using the legacy default policy.
load_balancing_policy = lb_policies.LEGACY_DEFAULT_POLICY
return {
'name': name,
'controller_job_id': controller_job_id,
Expand Down
6 changes: 3 additions & 3 deletions sky/skylet/job_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ def update_job_status(job_ids: List[int],
'it to FAILED_DRIVER')
status = JobStatus.FAILED_DRIVER
elif job_pid < 0:
# TODO(zhwu): Backward compatibility, remove after 0.9.0.
# TODO(zhwu): Backward compatibility, remove after 0.10.0.
# We set the job status to PENDING instead of actually
# checking ray job status and let the status in job table
# take effect in the later max.
Expand Down Expand Up @@ -882,7 +882,7 @@ def cancel_jobs_encoded_results(jobs: Optional[List[int]],
# child processes.
elif job['pid'] < 0:
try:
# TODO(zhwu): Backward compatibility, remove after 0.9.0.
# TODO(zhwu): Backward compatibility, remove after 0.10.0.
# The job was submitted with ray job submit before #4318.
job_client = _create_ray_job_submission_client()
job_client.stop_job(_make_ray_job_id(job['job_id']))
Expand Down Expand Up @@ -1008,7 +1008,7 @@ def cancel_jobs(cls,
# Print cancelled IDs. Caller should parse by decoding.
'print(cancelled, flush=True)',
]
# TODO(zhwu): Backward compatibility, remove after 0.9.0.
# TODO(zhwu): Backward compatibility, remove after 0.12.0.
if user_hash is None:
code = [
(f'cancelled = job_lib.cancel_jobs_encoded_results('
Expand Down