Skip to content

Commit 7e6c11e

Browse files
authored
fix: wrong raycluster type (#4135)
Signed-off-by: Cheyu Wu <[email protected]>
1 parent 944b60c commit 7e6c11e

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

dashboard/src/utils/v2/filter.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,14 @@ export const filterCluster = (
7979
};
8080

8181
export const clusterIsRayJob = (cluster: ClusterRow): boolean => {
82-
if (!cluster.labels) {
83-
return false;
82+
// Prefer official KubeRay label to determine whether a RayCluster originates from a RayJob
83+
const labels = cluster.labels || {};
84+
const originatedFrom = labels["ray.io/originated-from-crd"];
85+
if (originatedFrom?.toLowerCase() === "rayjob") {
86+
return true;
8487
}
8588

86-
const jobType = cluster.labels["mlp.rbx.com/component"];
87-
return jobType === "rayjob" || jobType === "rayllmbatchinference";
89+
// Backward compatibility: support legacy custom labels if present
90+
const comp = labels["mlp.rbx.com/component"];
91+
return comp === "rayjob" || comp === "rayllmbatchinference";
8892
};

0 commit comments

Comments
 (0)