Skip to content

Commit 0ac5104

Browse files
remove reference to cluster.up() in docs and outputs as it's now deprecated
1 parent e8404ec commit 0ac5104

File tree

10 files changed

+20
-20
lines changed

10 files changed

+20
-20
lines changed

docs/designs/History/CodeFlareSDK_Design_Doc.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Users can customize their AppWrapper by passing their desired parameters to `Clu
4242

4343
Our aim is to simplify the process of generating valid AppWrappers for RayClusters, so we will strive to find the appropriate balance between ease of use and exposing all possible AppWrapper parameters. And we will find this balance through user feedback.
4444

45-
With a valid AppWrapper, we will use the Kubernetes python client to apply the AppWrapper to our Kubernetes cluster via a call to `cluster.up()`
45+
With a valid AppWrapper, we will use the Kubernetes python client to apply the AppWrapper to our Kubernetes cluster via a call to `cluster.apply()`
4646

4747
We will also use the Kubernetes python client to get information about both the RayCluster and AppWrapper custom resources to monitor the status of our Framework Cluster via `cluster.status()` and `cluster.details()`.
4848

docs/sphinx/user-docs/cluster-configuration.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ This will automatically set the ``RAY_USAGE_STATS_ENABLED`` environment variable
6464
The ``labels={"exampleLabel": "example"}`` parameter can be used to
6565
apply additional labels to the RayCluster resource.
6666

67-
After creating their ``cluster``, a user can call ``cluster.up()`` and
67+
After creating their ``cluster``, a user can call ``cluster.apply()`` and
6868
``cluster.down()`` to respectively create or remove the Ray Cluster.
6969

7070
Custom Volumes/Volume Mounts

docs/sphinx/user-docs/ray-cluster-interaction.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ of it's usage:
3030
╰─────────────────────────────────────────────────────────────────╯
3131
(<CodeFlareClusterStatus.READY: 1>, True)
3232
cluster.down()
33-
cluster.up() # This function will create an exact copy of the retrieved Ray Cluster only if the Ray Cluster has been previously deleted.
33+
cluster.apply() # This function will create an exact copy of the retrieved Ray Cluster only if the Ray Cluster has been previously deleted.
3434

3535
| These are the parameters the ``get_cluster()`` function accepts:
3636
| ``cluster_name: str # Required`` -> The name of the Ray Cluster.

docs/sphinx/user-docs/ui-widgets.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ The Cluster Up/Down buttons appear after successfully initialising your
1414
`ClusterConfiguration <cluster-configuration.md#ray-cluster-configuration>`__.
1515
There are two buttons and a checkbox ``Cluster Up``, ``Cluster Down``
1616
and ``Wait for Cluster?`` which mimic the
17-
`cluster.up() <ray-cluster-interaction.md#clusterup>`__,
17+
`cluster.apply() <ray-cluster-interaction.md#clusterapply>`__,
1818
`cluster.down() <ray-cluster-interaction.md#clusterdown>`__ and
1919
`cluster.wait_ready() <ray-cluster-interaction.md#clusterwait_ready>`__
2020
functionality.

src/codeflare_sdk/ray/cluster/cluster.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ def wait_ready(self, timeout: Optional[int] = None, dashboard_check: bool = True
426426
status, ready = self.status(print_to_console=False)
427427
if status == CodeFlareClusterStatus.UNKNOWN:
428428
print(
429-
"WARNING: Current cluster status is unknown, have you run cluster.up yet?"
429+
"WARNING: Current cluster status is unknown, have you run cluster.apply() yet?"
430430
)
431431
if ready:
432432
break
@@ -518,7 +518,7 @@ def cluster_dashboard_uri(self) -> str:
518518
elif "route.openshift.io/termination" in annotations:
519519
protocol = "https"
520520
return f"{protocol}://{ingress.spec.rules[0].host}"
521-
return "Dashboard not available yet, have you run cluster.up()?"
521+
return "Dashboard not available yet, have you run cluster.apply()?"
522522

523523
def list_jobs(self) -> List:
524524
"""

src/codeflare_sdk/ray/cluster/pretty_print.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
def print_no_resources_found():
3232
console = Console()
33-
console.print(Panel("[red]No resources found, have you run cluster.up() yet?"))
33+
console.print(Panel("[red]No resources found, have you run cluster.apply() yet?"))
3434

3535

3636
def print_app_wrappers_status(app_wrappers: List[AppWrapper], starting: bool = False):

src/codeflare_sdk/ray/cluster/test_cluster.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
aw_dir = os.path.expanduser("~/.codeflare/resources/")
4646

4747

48-
def test_cluster_up_down(mocker):
48+
def test_cluster_apply_down(mocker):
4949
mocker.patch("kubernetes.client.ApisApi.get_api_versions")
5050
mocker.patch("kubernetes.config.load_kube_config", return_value="ignore")
5151
mocker.patch("codeflare_sdk.ray.cluster.cluster.Cluster._throw_for_no_raycluster")
@@ -70,7 +70,7 @@ def test_cluster_up_down(mocker):
7070
return_value=get_local_queue("kueue.x-k8s.io", "v1beta1", "ns", "localqueues"),
7171
)
7272
cluster = create_cluster(mocker)
73-
cluster.up()
73+
cluster.apply()
7474
cluster.down()
7575

7676

@@ -252,7 +252,7 @@ def test_cluster_apply_without_appwrapper(mocker):
252252
print("Cluster applied without AppWrapper.")
253253

254254

255-
def test_cluster_up_down_no_mcad(mocker):
255+
def test_cluster_apply_down_no_mcad(mocker):
256256
mocker.patch("codeflare_sdk.ray.cluster.cluster.Cluster._throw_for_no_raycluster")
257257
mocker.patch("kubernetes.config.load_kube_config", return_value="ignore")
258258
mocker.patch("kubernetes.client.ApisApi.get_api_versions")
@@ -282,7 +282,7 @@ def test_cluster_up_down_no_mcad(mocker):
282282
config.name = "unit-test-cluster-ray"
283283
config.appwrapper = False
284284
cluster = Cluster(config)
285-
cluster.up()
285+
cluster.apply()
286286
cluster.down()
287287

288288

@@ -324,7 +324,7 @@ def test_cluster_uris(mocker):
324324
)
325325
assert (
326326
cluster.cluster_dashboard_uri()
327-
== "Dashboard not available yet, have you run cluster.up()?"
327+
== "Dashboard not available yet, have you run cluster.apply()?"
328328
)
329329

330330
mocker.patch(
@@ -538,7 +538,7 @@ def test_wait_ready(mocker, capsys):
538538

539539
captured = capsys.readouterr()
540540
assert (
541-
"WARNING: Current cluster status is unknown, have you run cluster.up yet?"
541+
"WARNING: Current cluster status is unknown, have you run cluster.apply() yet?"
542542
in captured.out
543543
)
544544
mocker.patch(
@@ -571,7 +571,7 @@ def test_list_queue_appwrappers(mocker, capsys):
571571
captured = capsys.readouterr()
572572
assert captured.out == (
573573
"╭──────────────────────────────────────────────────────────────────────────────╮\n"
574-
"│ No resources found, have you run cluster.up() yet? \n"
574+
"│ No resources found, have you run cluster.apply() yet? │\n"
575575
"╰──────────────────────────────────────────────────────────────────────────────╯\n"
576576
)
577577
mocker.patch(
@@ -616,7 +616,7 @@ def test_list_queue_rayclusters(mocker, capsys):
616616
captured = capsys.readouterr()
617617
assert captured.out == (
618618
"╭──────────────────────────────────────────────────────────────────────────────╮\n"
619-
"│ No resources found, have you run cluster.up() yet? \n"
619+
"│ No resources found, have you run cluster.apply() yet? │\n"
620620
"╰──────────────────────────────────────────────────────────────────────────────╯\n"
621621
)
622622
mocker.patch(
@@ -658,7 +658,7 @@ def test_list_clusters(mocker, capsys):
658658
captured = capsys.readouterr()
659659
assert captured.out == (
660660
"╭──────────────────────────────────────────────────────────────────────────────╮\n"
661-
"│ No resources found, have you run cluster.up() yet? \n"
661+
"│ No resources found, have you run cluster.apply() yet? │\n"
662662
"╰──────────────────────────────────────────────────────────────────────────────╯\n"
663663
)
664664
mocker.patch(

src/codeflare_sdk/ray/cluster/test_pretty_print.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def test_print_no_resources(capsys):
4040
captured = capsys.readouterr()
4141
assert captured.out == (
4242
"╭──────────────────────────────────────────────────────────────────────────────╮\n"
43-
"│ No resources found, have you run cluster.up() yet? \n"
43+
"│ No resources found, have you run cluster.apply() yet? │\n"
4444
"╰──────────────────────────────────────────────────────────────────────────────╯\n"
4545
)
4646

tests/upgrade/raycluster_sdk_upgrade_sleep_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def run_mnist_raycluster_sdk_oauth(self):
6868
)
6969

7070
try:
71-
cluster.up()
71+
cluster.apply()
7272
cluster.status()
7373
# wait for raycluster to be Ready
7474
cluster.wait_ready()

tests/upgrade/raycluster_sdk_upgrade_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818

1919
# Creates a Ray cluster
20-
class TestMNISTRayClusterUp:
20+
class TestMNISTRayClusterApply:
2121
def setup_method(self):
2222
initialize_kubernetes_client(self)
2323
create_namespace_with_name(self, namespace)
@@ -63,7 +63,7 @@ def run_mnist_raycluster_sdk_oauth(self):
6363
)
6464

6565
try:
66-
cluster.up()
66+
cluster.apply()
6767
cluster.status()
6868
# wait for raycluster to be Ready
6969
cluster.wait_ready()

0 commit comments

Comments
 (0)