diff --git a/requirements/app/app.txt b/requirements/app/app.txt index 8c77f23e666b2..4c7ef3b796980 100644 --- a/requirements/app/app.txt +++ b/requirements/app/app.txt @@ -1,4 +1,4 @@ -lightning-cloud == 0.5.61 # Must be pinned to ensure compatibility +lightning-cloud == 0.5.64 # Must be pinned to ensure compatibility packaging typing-extensions >=4.4.0, <4.10.0 deepdiff >=5.7.0, <6.6.0 diff --git a/src/lightning/app/cli/commands/cp.py b/src/lightning/app/cli/commands/cp.py index 8fd31b8d2c379..0b11a874b216d 100644 --- a/src/lightning/app/cli/commands/cp.py +++ b/src/lightning/app/cli/commands/cp.py @@ -30,7 +30,6 @@ Externalv1LightningappInstance, ProjectIdStorageBody, V1CloudSpace, - V1GetClusterResponse, ) from rich.live import Live from rich.progress import BarColumn, DownloadColumn, Progress, TaskID, TextColumn @@ -332,16 +331,14 @@ def _get_progress_bar(**kwargs: Any) -> Progress: ) -def _storage_host(cluster: Union[V1GetClusterResponse, Externalv1Cluster]) -> str: +def _storage_host(cluster: Externalv1Cluster) -> str: dev_host = os.environ.get("LIGHTNING_STORAGE_HOST") if dev_host: return dev_host return f"https://storage.{cluster.spec.driver.kubernetes.root_domain_name}" -def _cluster_from_lit_resource( - lit_resource: Union[Externalv1LightningappInstance, V1CloudSpace] -) -> Union[V1GetClusterResponse, Externalv1Cluster]: +def _cluster_from_lit_resource(lit_resource: Union[Externalv1LightningappInstance, V1CloudSpace]) -> Externalv1Cluster: client = LightningClient() if isinstance(lit_resource, Externalv1LightningappInstance): return client.cluster_service_get_cluster(lit_resource.spec.cluster_id) diff --git a/src/lightning/data/streaming/constants.py b/src/lightning/data/streaming/constants.py index c020bb080d1df..ba9d605b97161 100644 --- a/src/lightning/data/streaming/constants.py +++ b/src/lightning/data/streaming/constants.py @@ -26,7 +26,7 @@ # This is required for full pytree serialization / deserialization support _TORCH_GREATER_EQUAL_2_1_0 = RequirementCache("torch>=2.1.0") _VIZ_TRACKER_AVAILABLE = RequirementCache("viztracer") -_LIGHTNING_CLOUD_LATEST = RequirementCache("lightning-cloud>=0.5.61") +_LIGHTNING_CLOUD_LATEST = RequirementCache("lightning-cloud>=0.5.64") _BOTO3_AVAILABLE = RequirementCache("boto3") # DON'T CHANGE ORDER diff --git a/tests/integrations_app/public/test_scripts.py b/tests/integrations_app/public/test_scripts.py index d680830cff462..0a777784690d3 100644 --- a/tests/integrations_app/public/test_scripts.py +++ b/tests/integrations_app/public/test_scripts.py @@ -8,7 +8,7 @@ from integrations_app.public import _PATH_EXAMPLES -@_RunIf(pl=True) +@_RunIf(pl=True, skip_windows=True) @pytest.mark.parametrize( "file", [ @@ -21,7 +21,7 @@ def test_scripts(file): @pytest.mark.xfail(strict=False, reason="causing some issues with CI, not sure if the test is actually needed") -@_RunIf(pl=True) +@_RunIf(pl=True, skip_windows=True) def test_components_app_example(): runner = CliRunner() result = runner.invoke( diff --git a/tests/tests_app/cli/test_cp.py b/tests/tests_app/cli/test_cp.py index 311badede7c01..303d93968a8c1 100644 --- a/tests/tests_app/cli/test_cp.py +++ b/tests/tests_app/cli/test_cp.py @@ -12,7 +12,6 @@ V1CloudSpace, V1ClusterDriver, V1ClusterSpec, - V1GetClusterResponse, V1KubernetesClusterDriver, V1LightningappInstanceArtifact, V1LightningappInstanceSpec, @@ -213,7 +212,7 @@ def test_cp_zip_remote_to_local_app_artifact(monkeypatch): monkeypatch.setattr(cp, "_AuthTokenGetter", MagicMock(return_value=token_getter)) client = MagicMock() - client.cluster_service_get_cluster.return_value = V1GetClusterResponse( + client.cluster_service_get_cluster.return_value = Externalv1Cluster( spec=V1ClusterSpec(driver=V1ClusterDriver(kubernetes=V1KubernetesClusterDriver(root_domain_name="my-domain"))) ) client.projects_service_list_memberships.return_value = V1ListMembershipsResponse( diff --git a/tests/tests_app/runners/test_cloud.py b/tests/tests_app/runners/test_cloud.py index fb454e267cdb8..971d12b701577 100644 --- a/tests/tests_app/runners/test_cloud.py +++ b/tests/tests_app/runners/test_cloud.py @@ -38,7 +38,6 @@ V1DriveStatus, V1DriveType, V1EnvVar, - V1GetClusterResponse, V1GetUserResponse, V1LightningappInstanceSpec, V1LightningappInstanceState, @@ -208,7 +207,7 @@ def test_new_instance_on_different_cluster(self, tmpdir, cloud_backend, project_ ) # Mock all clusters as global clusters - mock_client.cluster_service_get_cluster.side_effect = lambda cluster_id: V1GetClusterResponse( + mock_client.cluster_service_get_cluster.side_effect = lambda cluster_id: Externalv1Cluster( id=cluster_id, spec=V1ClusterSpec(cluster_type=V1ClusterType.GLOBAL) ) @@ -277,7 +276,7 @@ def test_running_deleted_app(self, tmpdir, cloud_backend, project_id): ) # Mock all clusters as global clusters - mock_client.cluster_service_get_cluster.side_effect = lambda cluster_id: V1GetClusterResponse( + mock_client.cluster_service_get_cluster.side_effect = lambda cluster_id: Externalv1Cluster( id=cluster_id, spec=V1ClusterSpec(cluster_type=V1ClusterType.GLOBAL) ) @@ -588,7 +587,7 @@ def test_call_with_work_app(self, lightningapps, start_with_flow, monkeypatch, t mock_client.projects_service_list_project_cluster_bindings.return_value = V1ListProjectClusterBindingsResponse( clusters=[V1ProjectClusterBinding(cluster_id="test")] ) - mock_client.cluster_service_get_cluster.side_effect = lambda cluster_id: V1GetClusterResponse( + mock_client.cluster_service_get_cluster.side_effect = lambda cluster_id: Externalv1Cluster( id=cluster_id, spec=V1ClusterSpec(cluster_type=V1ClusterType.GLOBAL) ) 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 mock_client.projects_service_list_project_cluster_bindings.return_value = V1ListProjectClusterBindingsResponse( clusters=[V1ProjectClusterBinding(cluster_id="test")] ) - mock_client.cluster_service_get_cluster.side_effect = lambda cluster_id: V1GetClusterResponse( + mock_client.cluster_service_get_cluster.side_effect = lambda cluster_id: Externalv1Cluster( id=cluster_id, spec=V1ClusterSpec(cluster_type=V1ClusterType.GLOBAL) ) 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 mock_client.projects_service_list_project_cluster_bindings.return_value = ( V1ListProjectClusterBindingsResponse(clusters=[V1ProjectClusterBinding(cluster_id="test")]) ) - mock_client.cluster_service_get_cluster.side_effect = lambda cluster_id: V1GetClusterResponse( + mock_client.cluster_service_get_cluster.side_effect = lambda cluster_id: Externalv1Cluster( id=cluster_id, spec=V1ClusterSpec(cluster_type=V1ClusterType.GLOBAL) ) 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 ] ) ) - mock_client.cluster_service_get_cluster.side_effect = lambda cluster_id: V1GetClusterResponse( + mock_client.cluster_service_get_cluster.side_effect = lambda cluster_id: Externalv1Cluster( id=cluster_id, spec=V1ClusterSpec(cluster_type=V1ClusterType.GLOBAL) ) 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 mock_client.projects_service_list_project_cluster_bindings.return_value = ( V1ListProjectClusterBindingsResponse(clusters=[V1ProjectClusterBinding(cluster_id="test")]) ) - mock_client.cluster_service_get_cluster.side_effect = lambda cluster_id: V1GetClusterResponse( + mock_client.cluster_service_get_cluster.side_effect = lambda cluster_id: Externalv1Cluster( id=cluster_id, spec=V1ClusterSpec(cluster_type=V1ClusterType.GLOBAL) ) mock_client.cloud_space_service_list_cloud_spaces.return_value = V1ListCloudSpacesResponse( diff --git a/tests/tests_data/streaming/test_resolver.py b/tests/tests_data/streaming/test_resolver.py index ce03570899742..0cc6a12e2df3f 100644 --- a/tests/tests_data/streaming/test_resolver.py +++ b/tests/tests_data/streaming/test_resolver.py @@ -16,7 +16,6 @@ V1ListClustersResponse, V1ListDataConnectionsResponse, ) -from lightning_cloud.resolver import _resolve_dir @pytest.mark.skipif(sys.platform == "win32", reason="windows isn't supported") @@ -356,7 +355,7 @@ def test_resolve_dir_absolute(tmp_path, monkeypatch): # relative path monkeypatch.chdir(tmp_path) relative = "relative" - resolved_dir = _resolve_dir(str(relative)) + resolved_dir = resolver._resolve_dir(str(relative)) assert resolved_dir.path == str(tmp_path / relative) assert Path(resolved_dir.path).is_absolute() monkeypatch.undo() @@ -367,4 +366,4 @@ def test_resolve_dir_absolute(tmp_path, monkeypatch): link = tmp_path / "link" link.symlink_to(src) assert link.resolve() == src - assert _resolve_dir(str(link)).path == str(src) + assert resolver._resolve_dir(str(link)).path == str(src)