Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
danielgafni committed Apr 19, 2024
1 parent 2dc0236 commit 495bd81
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions dagster_ray/kuberay/ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def delete_kuberay_clusters_op(
context.log.exception(f"Couldn't delete RayCluster {config.namespace}/{cluster_name}")


class DeleteOldKubeRayClustersConfig(Config):
class CleanupKuberayClustersConfig(Config):
namespace: str = "kuberay"
label_selector: str = Field(
default=f"dagster.io/deployment={DEFAULT_DEPLOYMENT_NAME}", description="Label selector to filter RayClusters"
Expand All @@ -42,7 +42,7 @@ class DeleteOldKubeRayClustersConfig(Config):
)
def cleanup_kuberay_clusters_op(
context: OpExecutionContext,
config: DeleteOldKubeRayClustersConfig,
config: CleanupKuberayClustersConfig,
kuberay_api: KubeRayAPI,
) -> None:
current_runs = context.instance.get_runs(
Expand Down
9 changes: 4 additions & 5 deletions tests/test_kuberay.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
from dagster_ray import RayResource
from dagster_ray.kuberay import KubeRayAPI, KubeRayCluster, cleanup_kuberay_clusters
from dagster_ray.kuberay.configs import DEFAULT_HEAD_GROUP_SPEC, DEFAULT_WORKER_GROUP_SPECS, RayClusterConfig
from dagster_ray.kuberay.ops import CleanupKuberayClustersConfig
from tests import ROOT_DIR


Expand Down Expand Up @@ -261,11 +262,9 @@ def my_asset(ray_cluster: RayResource) -> None:
cleanup_kuberay_clusters.execute_in_process(
run_config=RunConfig(
ops={
"cleanup_kuberay_clusters": {
"config": {
"namespace": ray_cluster_resource_skip_cleanup.namespace,
}
}
"cleanup_kuberay_clusters": CleanupKuberayClustersConfig(
namespace=ray_cluster_resource_skip_cleanup.namespace,
)
}
)
)
Expand Down

0 comments on commit 495bd81

Please sign in to comment.