Skip to content

Commit

Permalink
fix k8 nightly release tests failures
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexandra Belousov authored and Alexandra Belousov committed Dec 30, 2024
1 parent 8b0a969 commit 484b604
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions runhouse/resources/hardware/on_demand_cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,12 @@ def _populate_connection_from_status_dict(self, cluster_dict: Dict[str, Any]):
ssh_values = backend_utils.ssh_credential_from_yaml(
yaml_path, ssh_user=handle.ssh_user
)
# removing unnecessary apostrophes form ssh_proxy_command, if such exist.
# meaning if ssh_proxy_command contains "...ProxyCommand='...' ", we are setting it to "...ProxyCommand=... "
if ssh_values["ssh_proxy_command"]:
ssh_values["ssh_proxy_command"] = ssh_values.get(
"ssh_proxy_command"
).replace("'", "")
if not self.creds_values or not self.ssh_properties:
self._setup_creds(ssh_values)

Expand Down Expand Up @@ -526,6 +532,9 @@ def _populate_connection_from_status_dict(self, cluster_dict: Dict[str, Any]):
_, current_context = kubernetes.config.list_kube_config_contexts()
self.compute_properties["kube_context"] = current_context["name"]

self._kube_namespace = self.compute_properties.get("kube_namespace")
self._kube_context = self.compute_properties.get("kube_context")

def _update_from_sky_status(self, dryrun: bool = False):
# Try to get the cluster status from SkyDB
if self.is_shared:
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/on_demand_cluster_fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def ondemand_k8s_cluster(request, test_rns_folder):

# Note: Cannot specify both `instance_type` and any of `memory`, `disk_size`, `num_cpus`, or `accelerators`
args = {
"name": "k8s-cpu",
"name": f"{test_rns_folder}-k8s-cpu",
"provider": "kubernetes",
"instance_type": "CPU:1",
}
Expand Down

0 comments on commit 484b604

Please sign in to comment.