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 Jan 6, 2025
1 parent 973a8c6 commit ebd2b6d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
3 changes: 3 additions & 0 deletions runhouse/resources/hardware/on_demand_cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,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
8 changes: 8 additions & 0 deletions tests/test_resources/test_clusters/test_cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,14 @@ def test_condensed_config_for_cluster(self, cluster):
]
on_cluster_config = remove_config_keys(on_cluster_config, keys_to_skip)
local_cluster_config = remove_config_keys(local_cluster_config, keys_to_skip)
if local_cluster_config.get("ssh_properties") and local_cluster_config.get(
"ssh_properties"
).get("ssh_proxy_command"):
local_cluster_config["ssh_properties"]["ssh_proxy_command"] = (
local_cluster_config.get("ssh_properties")
.get("ssh_proxy_command")
.replace("'", "")
)

assert on_cluster_config == local_cluster_config

Expand Down

0 comments on commit ebd2b6d

Please sign in to comment.