33from abc import ABC
44from collections .abc import Sequence
55from itertools import chain
6- from pathlib import Path
6+ from pathlib import PurePosixPath
77from typing import Any
88from urllib .parse import urljoin , urlparse
99
@@ -44,8 +44,8 @@ def __init__(
4444 user_secrets : K8sUserSecrets | None ,
4545 cloudstorage : Sequence [ICloudStorageRequest ],
4646 k8s_client : K8sClient ,
47- workspace_mount_path : Path ,
48- work_dir : Path ,
47+ workspace_mount_path : PurePosixPath ,
48+ work_dir : PurePosixPath ,
4949 config : _NotebooksConfig ,
5050 internal_gitlab_user : APIUser ,
5151 using_default_image : bool = False ,
@@ -205,7 +205,7 @@ async def _get_session_manifest(self) -> dict[str, Any]:
205205 "pvc" : {
206206 "enabled" : True ,
207207 "storageClassName" : self .config .sessions .storage .pvs_storage_class ,
208- "mountPath" : self .workspace_mount_path .absolute (). as_posix (),
208+ "mountPath" : self .workspace_mount_path .as_posix (),
209209 },
210210 }
211211 else :
@@ -214,7 +214,7 @@ async def _get_session_manifest(self) -> dict[str, Any]:
214214 "size" : storage_size ,
215215 "pvc" : {
216216 "enabled" : False ,
217- "mountPath" : self .workspace_mount_path .absolute (). as_posix (),
217+ "mountPath" : self .workspace_mount_path .as_posix (),
218218 },
219219 }
220220 # Authentication
@@ -257,7 +257,7 @@ async def _get_session_manifest(self) -> dict[str, Any]:
257257 "jupyterServer" : {
258258 "defaultUrl" : self .server_options .default_url ,
259259 "image" : self .image ,
260- "rootDir" : self .work_dir .absolute (). as_posix (),
260+ "rootDir" : self .work_dir .as_posix (),
261261 "resources" : self .server_options .to_k8s_resources (
262262 enforce_cpu_limits = self .config .sessions .enforce_cpu_limits
263263 ),
@@ -378,8 +378,8 @@ def __init__(
378378 user_secrets : K8sUserSecrets | None ,
379379 cloudstorage : Sequence [ICloudStorageRequest ],
380380 k8s_client : K8sClient ,
381- workspace_mount_path : Path ,
382- work_dir : Path ,
381+ workspace_mount_path : PurePosixPath ,
382+ work_dir : PurePosixPath ,
383383 config : _NotebooksConfig ,
384384 gitlab_project : Project | None ,
385385 internal_gitlab_user : APIUser ,
@@ -503,8 +503,8 @@ def __init__(
503503 user_secrets : K8sUserSecrets | None ,
504504 cloudstorage : Sequence [ICloudStorageRequest ],
505505 k8s_client : K8sClient ,
506- workspace_mount_path : Path ,
507- work_dir : Path ,
506+ workspace_mount_path : PurePosixPath ,
507+ work_dir : PurePosixPath ,
508508 repositories : list [Repository ],
509509 config : _NotebooksConfig ,
510510 internal_gitlab_user : APIUser ,
0 commit comments