Skip to content

Commit

Permalink
cluster is_shared bugfix (#574)
Browse files Browse the repository at this point in the history
Co-authored-by: Alexandra Belousov <sashabelousovrh@Alexandras-MacBook-Pro.local>
  • Loading branch information
BelSasha and Alexandra Belousov committed Mar 7, 2024
1 parent 628ec13 commit 5f95b23
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion runhouse/resources/hardware/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,8 @@ def is_shared(self) -> bool:
from runhouse import Secret

ssh_creds = self.creds_values
if not ssh_creds:
return False

ssh_private_key = ssh_creds.get("ssh_private_key")
ssh_private_key_path = Path(ssh_private_key).expanduser()
Expand All @@ -274,7 +276,7 @@ def is_shared(self) -> bool:
if str(ssh_private_key_path).startswith(str(secrets_base_dir)):
return True

return f"{ssh_creds.name}/" in ssh_creds.get("ssh_private_key", "")
return f"{self._creds.name}/" in ssh_creds.get("ssh_private_key", "")

def is_up(self) -> bool:
"""Check if the cluster is up.
Expand Down

0 comments on commit 5f95b23

Please sign in to comment.