You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
returnfmt.Errorf("worker group %s has idleTimeoutSeconds set, but %s environment variable is not set to 'true' in the head pod", workerGroup.GroupName, RAY_ENABLE_AUTOSCALER_V2)
returnfmt.Errorf("worker group %s has idleTimeoutSeconds set, but autoscaler v2 is not enabled. Please set .spec.autoscalerOptions.version to 'v2' or set %s environment variable to 'true' in the head pod", workerGroup.GroupName, RAY_ENABLE_AUTOSCALER_V2)
expectedErr: "worker group worker-group-1 has idleTimeoutSeconds set, but RAY_enable_autoscaler_v2 environment variable is not set to 'true' in the head pod",
1973
+
expectedErr: fmt.Sprintf("worker group worker-group-1 has idleTimeoutSeconds set, but autoscaler v2 is not enabled. Please set .spec.autoscalerOptions.version to 'v2' or set %s environment variable to 'true' in the head pod", RAY_ENABLE_AUTOSCALER_V2),
1968
1974
},
1969
1975
"should reject idleTimeoutSeconds when autoscaler version is not set": {
expectedErr: "worker group worker-group-1 has idleTimeoutSeconds set, but RAY_enable_autoscaler_v2 environment variable is not set to 'true' in the head pod",
1994
+
expectedErr: fmt.Sprintf("worker group worker-group-1 has idleTimeoutSeconds set, but autoscaler v2 is not enabled. Please set .spec.autoscalerOptions.version to 'v2' or set %s environment variable to 'true' in the head pod", RAY_ENABLE_AUTOSCALER_V2),
1986
1995
},
1987
1996
"should reject idleTimeoutSeconds when AutoscalerOptions is nil": {
expectedErr: "worker group worker-group-1 has idleTimeoutSeconds set, but RAY_enable_autoscaler_v2 environment variable is not set to 'true' in the head pod",
2012
+
expectedErr: fmt.Sprintf("worker group worker-group-1 has idleTimeoutSeconds set, but autoscaler v2 is not enabled. Please set .spec.autoscalerOptions.version to 'v2' or set %s environment variable to 'true' in the head pod", RAY_ENABLE_AUTOSCALER_V2),
2004
2013
},
2005
-
"should reject idleTimeoutSeconds when env var is set to invalid value": {
2014
+
"should accept worker group with idleTimeoutSeconds when env var is set to '1' (legacy < 1.4.0)": {
expectedErr: "worker group worker-group-1 has idleTimeoutSeconds set, but RAY_enable_autoscaler_v2 environment variable is not set to 'true' in the head pod",
2032
+
expectedErr: "",
2024
2033
},
2025
-
"should accept worker group with idleTimeoutSeconds when env var is set to true": {
2034
+
"should accept worker group with idleTimeoutSeconds when env var is set to 'true' (legacy < 1.4.0)": {
"should reject idleTimeoutSeconds when env var is set to 'false'": {
2055
+
spec: rayv1.RayClusterSpec{
2056
+
EnableInTreeAutoscaling: ptr.To(true),
2057
+
HeadGroupSpec: rayv1.HeadGroupSpec{
2058
+
Template: podTemplateSpec([]corev1.EnvVar{
2059
+
{Name: RAY_ENABLE_AUTOSCALER_V2, Value: "false"},
2060
+
}, nil),
2061
+
},
2062
+
WorkerGroupSpecs: []rayv1.WorkerGroupSpec{
2063
+
{
2064
+
GroupName: "worker-group-1",
2065
+
Template: podTemplateSpec(nil, nil),
2066
+
IdleTimeoutSeconds: ptr.To(int32(60)),
2067
+
MinReplicas: ptr.To(int32(0)),
2068
+
MaxReplicas: ptr.To(int32(10)),
2069
+
},
2070
+
},
2071
+
},
2072
+
expectedErr: fmt.Sprintf("worker group worker-group-1 has idleTimeoutSeconds set, but autoscaler v2 is not enabled. Please set .spec.autoscalerOptions.version to 'v2' or set %s environment variable to 'true' in the head pod", RAY_ENABLE_AUTOSCALER_V2),
2073
+
},
2045
2074
"should accept worker group without idleTimeoutSeconds and without autoscaler v2": {
0 commit comments