Skip to content

Commit 10c3a71

Browse files
authored
Bump Lightning Cloud 0.5.64 (#19372)
1 parent 5361acd commit 10c3a71

File tree

7 files changed

+16
-22
lines changed

7 files changed

+16
-22
lines changed

requirements/app/app.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
lightning-cloud == 0.5.61 # Must be pinned to ensure compatibility
1+
lightning-cloud == 0.5.64 # Must be pinned to ensure compatibility
22
packaging
33
typing-extensions >=4.4.0, <4.10.0
44
deepdiff >=5.7.0, <6.6.0

src/lightning/app/cli/commands/cp.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
Externalv1LightningappInstance,
3131
ProjectIdStorageBody,
3232
V1CloudSpace,
33-
V1GetClusterResponse,
3433
)
3534
from rich.live import Live
3635
from rich.progress import BarColumn, DownloadColumn, Progress, TaskID, TextColumn
@@ -332,16 +331,14 @@ def _get_progress_bar(**kwargs: Any) -> Progress:
332331
)
333332

334333

335-
def _storage_host(cluster: Union[V1GetClusterResponse, Externalv1Cluster]) -> str:
334+
def _storage_host(cluster: Externalv1Cluster) -> str:
336335
dev_host = os.environ.get("LIGHTNING_STORAGE_HOST")
337336
if dev_host:
338337
return dev_host
339338
return f"https://storage.{cluster.spec.driver.kubernetes.root_domain_name}"
340339

341340

342-
def _cluster_from_lit_resource(
343-
lit_resource: Union[Externalv1LightningappInstance, V1CloudSpace]
344-
) -> Union[V1GetClusterResponse, Externalv1Cluster]:
341+
def _cluster_from_lit_resource(lit_resource: Union[Externalv1LightningappInstance, V1CloudSpace]) -> Externalv1Cluster:
345342
client = LightningClient()
346343
if isinstance(lit_resource, Externalv1LightningappInstance):
347344
return client.cluster_service_get_cluster(lit_resource.spec.cluster_id)

src/lightning/data/streaming/constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
# This is required for full pytree serialization / deserialization support
2727
_TORCH_GREATER_EQUAL_2_1_0 = RequirementCache("torch>=2.1.0")
2828
_VIZ_TRACKER_AVAILABLE = RequirementCache("viztracer")
29-
_LIGHTNING_CLOUD_LATEST = RequirementCache("lightning-cloud>=0.5.61")
29+
_LIGHTNING_CLOUD_LATEST = RequirementCache("lightning-cloud>=0.5.64")
3030
_BOTO3_AVAILABLE = RequirementCache("boto3")
3131

3232
# DON'T CHANGE ORDER

tests/integrations_app/public/test_scripts.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from integrations_app.public import _PATH_EXAMPLES
99

1010

11-
@_RunIf(pl=True)
11+
@_RunIf(pl=True, skip_windows=True)
1212
@pytest.mark.parametrize(
1313
"file",
1414
[
@@ -21,7 +21,7 @@ def test_scripts(file):
2121

2222

2323
@pytest.mark.xfail(strict=False, reason="causing some issues with CI, not sure if the test is actually needed")
24-
@_RunIf(pl=True)
24+
@_RunIf(pl=True, skip_windows=True)
2525
def test_components_app_example():
2626
runner = CliRunner()
2727
result = runner.invoke(

tests/tests_app/cli/test_cp.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
V1CloudSpace,
1313
V1ClusterDriver,
1414
V1ClusterSpec,
15-
V1GetClusterResponse,
1615
V1KubernetesClusterDriver,
1716
V1LightningappInstanceArtifact,
1817
V1LightningappInstanceSpec,
@@ -213,7 +212,7 @@ def test_cp_zip_remote_to_local_app_artifact(monkeypatch):
213212
monkeypatch.setattr(cp, "_AuthTokenGetter", MagicMock(return_value=token_getter))
214213

215214
client = MagicMock()
216-
client.cluster_service_get_cluster.return_value = V1GetClusterResponse(
215+
client.cluster_service_get_cluster.return_value = Externalv1Cluster(
217216
spec=V1ClusterSpec(driver=V1ClusterDriver(kubernetes=V1KubernetesClusterDriver(root_domain_name="my-domain")))
218217
)
219218
client.projects_service_list_memberships.return_value = V1ListMembershipsResponse(

tests/tests_app/runners/test_cloud.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
V1DriveStatus,
3939
V1DriveType,
4040
V1EnvVar,
41-
V1GetClusterResponse,
4241
V1GetUserResponse,
4342
V1LightningappInstanceSpec,
4443
V1LightningappInstanceState,
@@ -208,7 +207,7 @@ def test_new_instance_on_different_cluster(self, tmpdir, cloud_backend, project_
208207
)
209208

210209
# Mock all clusters as global clusters
211-
mock_client.cluster_service_get_cluster.side_effect = lambda cluster_id: V1GetClusterResponse(
210+
mock_client.cluster_service_get_cluster.side_effect = lambda cluster_id: Externalv1Cluster(
212211
id=cluster_id, spec=V1ClusterSpec(cluster_type=V1ClusterType.GLOBAL)
213212
)
214213

@@ -277,7 +276,7 @@ def test_running_deleted_app(self, tmpdir, cloud_backend, project_id):
277276
)
278277

279278
# Mock all clusters as global clusters
280-
mock_client.cluster_service_get_cluster.side_effect = lambda cluster_id: V1GetClusterResponse(
279+
mock_client.cluster_service_get_cluster.side_effect = lambda cluster_id: Externalv1Cluster(
281280
id=cluster_id, spec=V1ClusterSpec(cluster_type=V1ClusterType.GLOBAL)
282281
)
283282

@@ -588,7 +587,7 @@ def test_call_with_work_app(self, lightningapps, start_with_flow, monkeypatch, t
588587
mock_client.projects_service_list_project_cluster_bindings.return_value = V1ListProjectClusterBindingsResponse(
589588
clusters=[V1ProjectClusterBinding(cluster_id="test")]
590589
)
591-
mock_client.cluster_service_get_cluster.side_effect = lambda cluster_id: V1GetClusterResponse(
590+
mock_client.cluster_service_get_cluster.side_effect = lambda cluster_id: Externalv1Cluster(
592591
id=cluster_id, spec=V1ClusterSpec(cluster_type=V1ClusterType.GLOBAL)
593592
)
594593
mock_client.cloud_space_service_create_lightning_run_instance.return_value = V1LightningRun()
@@ -765,7 +764,7 @@ def test_call_with_work_app_and_attached_drives(self, lightningapps, monkeypatch
765764
mock_client.projects_service_list_project_cluster_bindings.return_value = V1ListProjectClusterBindingsResponse(
766765
clusters=[V1ProjectClusterBinding(cluster_id="test")]
767766
)
768-
mock_client.cluster_service_get_cluster.side_effect = lambda cluster_id: V1GetClusterResponse(
767+
mock_client.cluster_service_get_cluster.side_effect = lambda cluster_id: Externalv1Cluster(
769768
id=cluster_id, spec=V1ClusterSpec(cluster_type=V1ClusterType.GLOBAL)
770769
)
771770
mock_client.cloud_space_service_create_lightning_run_instance.return_value = V1LightningRun()
@@ -901,7 +900,7 @@ def test_call_with_work_app_and_app_comment_command_execution_set(self, lightnin
901900
mock_client.projects_service_list_project_cluster_bindings.return_value = (
902901
V1ListProjectClusterBindingsResponse(clusters=[V1ProjectClusterBinding(cluster_id="test")])
903902
)
904-
mock_client.cluster_service_get_cluster.side_effect = lambda cluster_id: V1GetClusterResponse(
903+
mock_client.cluster_service_get_cluster.side_effect = lambda cluster_id: Externalv1Cluster(
905904
id=cluster_id, spec=V1ClusterSpec(cluster_type=V1ClusterType.GLOBAL)
906905
)
907906
mock_client.cloud_space_service_list_cloud_spaces.return_value = V1ListCloudSpacesResponse(
@@ -1031,7 +1030,7 @@ def test_call_with_work_app_and_multiple_attached_drives(self, lightningapps, mo
10311030
]
10321031
)
10331032
)
1034-
mock_client.cluster_service_get_cluster.side_effect = lambda cluster_id: V1GetClusterResponse(
1033+
mock_client.cluster_service_get_cluster.side_effect = lambda cluster_id: Externalv1Cluster(
10351034
id=cluster_id, spec=V1ClusterSpec(cluster_type=V1ClusterType.GLOBAL)
10361035
)
10371036
mock_client.cloud_space_service_list_cloud_spaces.return_value = V1ListCloudSpacesResponse(
@@ -1247,7 +1246,7 @@ def test_call_with_work_app_and_attached_mount_and_drive(self, lightningapps, mo
12471246
mock_client.projects_service_list_project_cluster_bindings.return_value = (
12481247
V1ListProjectClusterBindingsResponse(clusters=[V1ProjectClusterBinding(cluster_id="test")])
12491248
)
1250-
mock_client.cluster_service_get_cluster.side_effect = lambda cluster_id: V1GetClusterResponse(
1249+
mock_client.cluster_service_get_cluster.side_effect = lambda cluster_id: Externalv1Cluster(
12511250
id=cluster_id, spec=V1ClusterSpec(cluster_type=V1ClusterType.GLOBAL)
12521251
)
12531252
mock_client.cloud_space_service_list_cloud_spaces.return_value = V1ListCloudSpacesResponse(

tests/tests_data/streaming/test_resolver.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
V1ListClustersResponse,
1717
V1ListDataConnectionsResponse,
1818
)
19-
from lightning_cloud.resolver import _resolve_dir
2019

2120

2221
@pytest.mark.skipif(sys.platform == "win32", reason="windows isn't supported")
@@ -356,7 +355,7 @@ def test_resolve_dir_absolute(tmp_path, monkeypatch):
356355
# relative path
357356
monkeypatch.chdir(tmp_path)
358357
relative = "relative"
359-
resolved_dir = _resolve_dir(str(relative))
358+
resolved_dir = resolver._resolve_dir(str(relative))
360359
assert resolved_dir.path == str(tmp_path / relative)
361360
assert Path(resolved_dir.path).is_absolute()
362361
monkeypatch.undo()
@@ -367,4 +366,4 @@ def test_resolve_dir_absolute(tmp_path, monkeypatch):
367366
link = tmp_path / "link"
368367
link.symlink_to(src)
369368
assert link.resolve() == src
370-
assert _resolve_dir(str(link)).path == str(src)
369+
assert resolver._resolve_dir(str(link)).path == str(src)

0 commit comments

Comments
 (0)