From 8f7c5dc8229ee41e71e32a8f3b5c3fd99f7c5326 Mon Sep 17 00:00:00 2001 From: Michael Shin Date: Fri, 20 Nov 2026 10:35:10 -0500 Subject: [PATCH 1/4] [SDK] Upgrade platform API client to 4.41.0 --- README.md | 4 +++- centml/cli/cluster.py | 19 +++++++++--------- requirements.txt | 2 +- tests/test_cli_cluster.py | 41 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 54 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 2b22be4..d7655d7 100644 --- a/README.md +++ b/README.md @@ -3,8 +3,10 @@ ### Installation -This client uses Platform API `4.37.1`. CServe deployments have been retired; +This client uses Platform API `4.41.0`. CServe deployments have been retired; the CServe SDK helpers and CLI deployment option are no longer available. +The unfiltered `ccluster ls` list displays historical deployments, Dynamo, +CCluster, and future deployment types using their API type names. To install without cloning, run the following command: ```bash diff --git a/centml/cli/cluster.py b/centml/cli/cluster.py index 7145737..a0e4189 100644 --- a/centml/cli/cluster.py +++ b/centml/cli/cluster.py @@ -179,16 +179,15 @@ def ls(type): deployments = cclient.get(depl_type) rows = [] for d in deployments: - if d.type in depl_type_to_name_map: - rows.append( - [ - d.id, - d.name, - depl_type_to_name_map[d.type], - d.status.value, - d.created_at.strftime("%Y-%m-%d %H:%M:%S"), - ] - ) + rows.append( + [ + d.id, + d.name, + depl_type_to_name_map.get(d.type, d.type.value), + d.status.value, + d.created_at.strftime("%Y-%m-%d %H:%M:%S"), + ] + ) click.echo( tabulate( diff --git a/requirements.txt b/requirements.txt index 5174292..20f20f7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,6 +5,6 @@ pyjwt>=2.8.0 cryptography==50.0.0 websockets>=16.0 pyte>=0.8.0 -platform-api-python-client==4.37.1 +platform-api-python-client==4.41.0 click>=8.4.1 typing-extensions>=4.5 diff --git a/tests/test_cli_cluster.py b/tests/test_cli_cluster.py index 5e3b00e..a66af1e 100644 --- a/tests/test_cli_cluster.py +++ b/tests/test_cli_cluster.py @@ -3,6 +3,7 @@ from types import SimpleNamespace from unittest.mock import MagicMock, patch +import pytest from click.testing import CliRunner from centml.cli.cluster import _get_ready_status, _get_service_status, _get_status_error_messages @@ -153,6 +154,46 @@ def test_ls_accepts_job_type_and_displays_jobs(): assert "job" in result.output +@pytest.mark.parametrize("command,args", [("get", ["cserve", "123"]), ("ls", ["cserve"])]) +def test_retired_cserve_type_is_rejected(command, args): + from centml.cli import cluster + + with _patch_cluster_client() as client: + result = CliRunner().invoke(getattr(cluster, command), args) + + assert result.exit_code == 2 + assert "Invalid value for" in result.output + client.get.assert_not_called() + client.get_cserve.assert_not_called() + + +def test_ls_keeps_historical_cserve_deployments_visible(): + from centml.cli.cluster import ls + + with _patch_cluster_client() as client: + client.get.return_value = [_deployment(type=DeploymentType.CSERVE_V3, name="old-cserve")] + result = CliRunner().invoke(ls) + + assert result.exit_code == 0 + assert "old-cserve" in result.output + assert "cserve" in result.output + + +@pytest.mark.parametrize( + "deployment_type", ["dynamo", "ccl_compute", "ccl_inference", "ccl_job", "ccl_dynamo", "future_type"] +) +def test_ls_displays_new_deployment_types(deployment_type): + from centml.cli.cluster import ls + + with _patch_cluster_client() as client: + client.get.return_value = [_deployment(type=DeploymentType(deployment_type), name="new-deployment")] + result = CliRunner().invoke(ls) + + assert result.exit_code == 0 + assert "new-deployment" in result.output + assert deployment_type in result.output + + def test_get_job_routes_to_job_api_and_displays_job_config(): from centml.cli.cluster import get From a40fc0df76e87c3c32bd233fa92dbf742264c7b1 Mon Sep 17 00:00:00 2001 From: Michael Shin Date: Fri, 20 Nov 2026 10:37:45 -0500 Subject: [PATCH 2/4] [CLI] Limit deployment listing update to Dynamo --- README.md | 2 -- centml/cli/cluster.py | 20 +++++++++++--------- tests/test_cli_cluster.py | 22 +++++++++++++--------- 3 files changed, 24 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index d7655d7..a71753d 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,6 @@ This client uses Platform API `4.41.0`. CServe deployments have been retired; the CServe SDK helpers and CLI deployment option are no longer available. -The unfiltered `ccluster ls` list displays historical deployments, Dynamo, -CCluster, and future deployment types using their API type names. To install without cloning, run the following command: ```bash diff --git a/centml/cli/cluster.py b/centml/cli/cluster.py index a0e4189..52145f0 100644 --- a/centml/cli/cluster.py +++ b/centml/cli/cluster.py @@ -23,6 +23,7 @@ DeploymentType.COMPUTE_V2: "compute", DeploymentType.RAG: "rag", DeploymentType.JOB: "job", + DeploymentType.DYNAMO: "dynamo", } # use latest type to for user requests depl_name_to_type_map = { @@ -179,15 +180,16 @@ def ls(type): deployments = cclient.get(depl_type) rows = [] for d in deployments: - rows.append( - [ - d.id, - d.name, - depl_type_to_name_map.get(d.type, d.type.value), - d.status.value, - d.created_at.strftime("%Y-%m-%d %H:%M:%S"), - ] - ) + if d.type in depl_type_to_name_map: + rows.append( + [ + d.id, + d.name, + depl_type_to_name_map[d.type], + d.status.value, + d.created_at.strftime("%Y-%m-%d %H:%M:%S"), + ] + ) click.echo( tabulate( diff --git a/tests/test_cli_cluster.py b/tests/test_cli_cluster.py index a66af1e..998fbe3 100644 --- a/tests/test_cli_cluster.py +++ b/tests/test_cli_cluster.py @@ -167,31 +167,35 @@ def test_retired_cserve_type_is_rejected(command, args): client.get_cserve.assert_not_called() -def test_ls_keeps_historical_cserve_deployments_visible(): +def test_ls_displays_dynamo_deployments(): from centml.cli.cluster import ls with _patch_cluster_client() as client: - client.get.return_value = [_deployment(type=DeploymentType.CSERVE_V3, name="old-cserve")] + client.get.return_value = [_deployment(type=DeploymentType.DYNAMO, name="test-dynamo")] result = CliRunner().invoke(ls) assert result.exit_code == 0 - assert "old-cserve" in result.output - assert "cserve" in result.output + assert "test-dynamo" in result.output + assert "dynamo" in result.output @pytest.mark.parametrize( - "deployment_type", ["dynamo", "ccl_compute", "ccl_inference", "ccl_job", "ccl_dynamo", "future_type"] + "deployment_type", ["ccl_compute", "ccl_inference", "ccl_job", "ccl_dynamo", "future_type", "cserve_v3"] ) -def test_ls_displays_new_deployment_types(deployment_type): +def test_ls_hides_unsupported_deployment_types(deployment_type): from centml.cli.cluster import ls with _patch_cluster_client() as client: - client.get.return_value = [_deployment(type=DeploymentType(deployment_type), name="new-deployment")] + client.get.return_value = [ + _deployment(type=DeploymentType(deployment_type), name="hidden-deployment"), + _deployment(type=DeploymentType.DYNAMO, name="visible-dynamo"), + ] result = CliRunner().invoke(ls) assert result.exit_code == 0 - assert "new-deployment" in result.output - assert deployment_type in result.output + assert "hidden-deployment" not in result.output + assert deployment_type not in result.output + assert "visible-dynamo" in result.output def test_get_job_routes_to_job_api_and_displays_job_config(): From a9e80d49cb8b0a8c4ad4ee59e8acd06e86192c92 Mon Sep 17 00:00:00 2001 From: Michael Shin Date: Fri, 20 Nov 2026 10:38:09 -0500 Subject: [PATCH 3/4] [Docs] Simplify platform API compatibility note --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index a71753d..063a4bb 100644 --- a/README.md +++ b/README.md @@ -3,8 +3,7 @@ ### Installation -This client uses Platform API `4.41.0`. CServe deployments have been retired; -the CServe SDK helpers and CLI deployment option are no longer available. +This client uses Platform API `4.41.0`. To install without cloning, run the following command: ```bash From 61318394a9b71ebb53d9fe0cb0ffc26bc10b2fa2 Mon Sep 17 00:00:00 2001 From: Michael Shin Date: Fri, 20 Nov 2026 10:38:32 -0500 Subject: [PATCH 4/4] [Release] Bump client version to 0.7.3 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 045111e..f8576e7 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ setup( name='centml', - version='0.7.2', + version='0.7.3', packages=find_packages(exclude=["tests", "tests.*"]), python_requires=">=3.10", long_description=open('README.md').read(),