Skip to content

Commit

Permalink
[Clouds] Remove old node providers for GCP and Kubernetes (#3287)
Browse files Browse the repository at this point in the history
* remove unused providers

* Remove code that should be removed in 0.5

* lint

* remove interactive nodes

* remove test for interactive node

* remove cpu/gpunode in comments

* fix node type

* Address comments
  • Loading branch information
Michaelvll authored Mar 10, 2024
1 parent a1c6f27 commit ee811e3
Show file tree
Hide file tree
Showing 22 changed files with 24 additions and 4,353 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,11 @@ jobs:
- name: Running yapf
run: |
yapf --diff --recursive ./ --exclude 'sky/skylet/ray_patches/**' \
--exclude 'sky/skylet/providers/gcp/**' \
--exclude 'sky/skylet/providers/azure/**' \
--exclude 'sky/skylet/providers/ibm/**'
- name: Running black
run: |
black --diff --check sky/skylet/providers/gcp/ \
sky/skylet/providers/azure/ \
black --diff --check sky/skylet/providers/azure/ \
sky/skylet/providers/ibm/
- name: Running isort for black formatted files
run: |
Expand All @@ -48,6 +46,5 @@ jobs:
- name: Running isort for yapf formatted files
run: |
isort --diff --check ./ --sg 'sky/skylet/ray_patches/**' \
--sg 'sky/skylet/providers/gcp/**' \
--sg 'sky/skylet/providers/azure/**' \
--sg 'sky/skylet/providers/ibm/**'
3 changes: 0 additions & 3 deletions format.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,20 +48,17 @@ YAPF_FLAGS=(

YAPF_EXCLUDES=(
'--exclude' 'build/**'
'--exclude' 'sky/skylet/providers/gcp/**'
'--exclude' 'sky/skylet/providers/azure/**'
'--exclude' 'sky/skylet/providers/ibm/**'
)

ISORT_YAPF_EXCLUDES=(
'--sg' 'build/**'
'--sg' 'sky/skylet/providers/gcp/**'
'--sg' 'sky/skylet/providers/azure/**'
'--sg' 'sky/skylet/providers/ibm/**'
)

BLACK_INCLUDES=(
'sky/skylet/providers/gcp'
'sky/skylet/providers/azure'
'sky/skylet/providers/ibm'
)
Expand Down
2 changes: 0 additions & 2 deletions sky/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ def get_git_commit():
from sky.core import queue
from sky.core import spot_cancel
from sky.core import spot_queue
from sky.core import spot_status
from sky.core import start
from sky.core import status
from sky.core import stop
Expand Down Expand Up @@ -135,7 +134,6 @@ def get_git_commit():
'job_status',
# core APIs Spot Job Management
'spot_queue',
'spot_status', # Deprecated (alias for spot_queue)
'spot_cancel',
# core APIs Storage Management
'storage_ls',
Expand Down
6 changes: 1 addition & 5 deletions sky/backends/backend_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -947,11 +947,7 @@ def write_cluster_config(
with open(tmp_yaml_path, 'w', encoding='utf-8') as f:
f.write(restored_yaml_content)

# Read the cluster name from the tmp yaml file, to take the backward
# compatbility restortion above into account.
# TODO: remove this after 2 minor releases, 0.5.0.
yaml_config = common_utils.read_yaml(tmp_yaml_path)
config_dict['cluster_name_on_cloud'] = yaml_config['cluster_name']
config_dict['cluster_name_on_cloud'] = cluster_name_on_cloud

# Optimization: copy the contents of source files in file_mounts to a
# special dir, and upload that as the only file_mount instead. Delay
Expand Down
15 changes: 4 additions & 11 deletions sky/backends/cloud_vm_ray_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -539,10 +539,6 @@ def add_ray_task(self,
sky_env_vars_dict_str += [
f'sky_env_vars_dict[{constants.TASK_ID_ENV_VAR!r}]'
f' = {job_run_id!r}',
# TODO(zhwu): remove this deprecated env var in later release
# (after 0.5).
f'sky_env_vars_dict[{constants.TASK_ID_ENV_VAR_DEPRECATED!r}]'
f' = {job_run_id!r}'
]
sky_env_vars_dict_str = '\n'.join(sky_env_vars_dict_str)

Expand Down Expand Up @@ -3433,13 +3429,10 @@ def cancel_jobs(self,
code = job_lib.JobLibCodeGen.cancel_jobs(jobs, cancel_all)

# All error messages should have been redirected to stdout.
returncode, stdout, stderr = self.run_on_head(handle,
code,
stream_logs=False,
require_outputs=True)
# TODO(zongheng): remove after >=0.5.0, 2 minor versions after.
backend_utils.check_stale_runtime_on_remote(returncode, stdout + stderr,
handle.cluster_name)
returncode, stdout, _ = self.run_on_head(handle,
code,
stream_logs=False,
require_outputs=True)
subprocess_utils.handle_returncode(
returncode, code,
f'Failed to cancel jobs on cluster {handle.cluster_name}.', stdout)
Expand Down
Loading

0 comments on commit ee811e3

Please sign in to comment.