@@ -834,7 +834,7 @@ var _ = Context("Inside the default namespace", func() {
834
834
DeferCleanup (cleanUpFunc )
835
835
})
836
836
837
- It ("Should handle HeadPodReady and RayClusterReady conditions correctly" , func (ctx SpecContext ) {
837
+ It ("Should handle HeadPodReady and RayClusterProvisioned conditions correctly" , func (ctx SpecContext ) {
838
838
namespace := "default"
839
839
rayCluster := rayClusterTemplate ("raycluster-status-conditions-enabled" , namespace )
840
840
rayCluster .Spec .WorkerGroupSpecs [0 ].Replicas = ptr.To [int32 ](1 )
@@ -873,7 +873,7 @@ var _ = Context("Inside the default namespace", func() {
873
873
headPod = headPods .Items [0 ]
874
874
875
875
By ("Check RayCluster conditions empty initially" )
876
- // Initially, neither head Pod nor worker Pod are ready. The RayClusterReady condition should not be present.
876
+ // Initially, neither head Pod nor worker Pod are ready. The RayClusterProvisioned condition should not be present.
877
877
Expect (testRayCluster .Status .Conditions ).To (BeEmpty ())
878
878
879
879
By ("Update the head pod to Running and Ready" )
@@ -887,7 +887,7 @@ var _ = Context("Inside the default namespace", func() {
887
887
Expect (k8sClient .Status ().Update (ctx , & headPod )).Should (Succeed ())
888
888
889
889
By ("Check RayCluster HeadPodReady condition is true" )
890
- // The head pod is ready, so RayClusterReady condition should be added and set to True.
890
+ // The head pod is ready, so HeadPodReady condition should be added and set to True.
891
891
Eventually (
892
892
func () bool {
893
893
if err := getResourceFunc (ctx , client.ObjectKey {Name : rayCluster .Name , Namespace : namespace }, rayCluster )(); err != nil {
@@ -897,14 +897,14 @@ var _ = Context("Inside the default namespace", func() {
897
897
},
898
898
time .Second * 3 , time .Millisecond * 500 ).Should (BeTrue ())
899
899
900
- By ("Check RayCluster RayClusterReady condition is false" )
901
- // But the worker pod is not ready yet, RayClusterReady condition should still be absent.
900
+ By ("Check RayCluster RayClusterProvisioned condition is false" )
901
+ // But the worker pod is not ready yet, RayClusterProvisioned condition should still be absent.
902
902
Consistently (
903
903
func () * metav1.Condition {
904
904
if err := getResourceFunc (ctx , client.ObjectKey {Name : rayCluster .Name , Namespace : namespace }, rayCluster )(); err != nil {
905
905
return nil
906
906
}
907
- return meta .FindStatusCondition (rayCluster .Status .Conditions , string (rayv1 .RayClusterReady ))
907
+ return meta .FindStatusCondition (rayCluster .Status .Conditions , string (rayv1 .RayClusterProvisioned ))
908
908
},
909
909
time .Second * 3 , time .Millisecond * 500 ).Should (BeNil ())
910
910
@@ -918,14 +918,14 @@ var _ = Context("Inside the default namespace", func() {
918
918
}
919
919
Expect (k8sClient .Status ().Update (ctx , & workerPod )).Should (Succeed ())
920
920
921
- By ("Check RayCluster RayClusterReady condition is true" )
922
- // All Ray Pods are ready for the first time, RayClusterReady condition should be added and set to True.
921
+ By ("Check RayCluster RayClusterProvisioned condition is true" )
922
+ // All Ray Pods are ready for the first time, RayClusterProvisioned condition should be added and set to True.
923
923
Eventually (
924
924
func () bool {
925
925
if err := getResourceFunc (ctx , client.ObjectKey {Name : rayCluster .Name , Namespace : namespace }, rayCluster )(); err != nil {
926
926
return false
927
927
}
928
- return meta .IsStatusConditionPresentAndEqual (rayCluster .Status .Conditions , string (rayv1 .RayClusterReady ), metav1 .ConditionTrue )
928
+ return meta .IsStatusConditionPresentAndEqual (rayCluster .Status .Conditions , string (rayv1 .RayClusterProvisioned ), metav1 .ConditionTrue )
929
929
},
930
930
time .Second * 3 , time .Millisecond * 500 ).Should (BeTrue ())
931
931
@@ -938,15 +938,15 @@ var _ = Context("Inside the default namespace", func() {
938
938
}
939
939
Expect (k8sClient .Status ().Update (ctx , & workerPod )).Should (Succeed ())
940
940
941
- By ("Check RayCluster RayClusterReady condition is true" )
942
- // The worker pod fails readiness, but since RayClusterReady focuses solely on the headPod after all Ray Pods were initially ready,
943
- // RayClusterReady condition should still be True.
941
+ By ("Check RayCluster RayClusterProvisioned condition is true" )
942
+ // The worker pod fails readiness, but since RayClusterProvisioned focuses solely on whether all Ray Pods are ready for the first time ,
943
+ // RayClusterProvisioned condition should still be True.
944
944
Consistently (
945
945
func () bool {
946
946
if err := getResourceFunc (ctx , client.ObjectKey {Name : rayCluster .Name , Namespace : namespace }, rayCluster )(); err != nil {
947
947
return false
948
948
}
949
- return meta .IsStatusConditionPresentAndEqual (rayCluster .Status .Conditions , string (rayv1 .RayClusterReady ), metav1 .ConditionTrue )
949
+ return meta .IsStatusConditionPresentAndEqual (rayCluster .Status .Conditions , string (rayv1 .RayClusterProvisioned ), metav1 .ConditionTrue )
950
950
},
951
951
time .Second * 3 , time .Millisecond * 500 ).Should (BeTrue ())
952
952
@@ -970,14 +970,14 @@ var _ = Context("Inside the default namespace", func() {
970
970
},
971
971
time .Second * 3 , time .Millisecond * 500 ).Should (BeTrue ())
972
972
973
- By ("Check RayCluster RayClusterReady condition is false " )
974
- // The head pod also fails readiness, RayClusterReady condition should set to False .
973
+ By ("Check RayCluster RayClusterProvisioned condition is still true " )
974
+ // The head pod also fails readiness, RayClusterProvisioned condition not changed .
975
975
Eventually (
976
976
func () bool {
977
977
if err := getResourceFunc (ctx , client.ObjectKey {Name : rayCluster .Name , Namespace : namespace }, rayCluster )(); err != nil {
978
978
return false
979
979
}
980
- return meta .IsStatusConditionPresentAndEqual (rayCluster .Status .Conditions , string (rayv1 .RayClusterReady ), metav1 .ConditionFalse )
980
+ return meta .IsStatusConditionPresentAndEqual (rayCluster .Status .Conditions , string (rayv1 .RayClusterProvisioned ), metav1 .ConditionTrue )
981
981
},
982
982
time .Second * 3 , time .Millisecond * 500 ).Should (BeTrue ())
983
983
})
0 commit comments