Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions ray-operator/controllers/ray/utils/validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,18 +193,18 @@ func ValidateRayClusterSpec(spec *rayv1.RayClusterSpec, annotations map[string]s

if IsAuthEnabled(spec) {
if spec.RayVersion == "" {
return fmt.Errorf("authOptions.mode is 'token' but RayVersion was not specified. Ray version 2.51.0 or later is required")
return fmt.Errorf("authOptions.mode is 'token' but RayVersion was not specified. Ray version 2.52.0 or later is required")
}

rayVersion, err := version.ParseGeneric(spec.RayVersion)
if err != nil {
return fmt.Errorf("authOptions.mode is 'token' but RayVersion format is invalid: %s, %w", spec.RayVersion, err)
}

// Require minimum Ray version 2.51.0
minVersion := version.MustParseGeneric("2.51.0")
// Require minimum Ray version 2.52.0
minVersion := version.MustParseGeneric("2.52.0")
if rayVersion.LessThan(minVersion) {
return fmt.Errorf("authOptions.mode is 'token' but minimum Ray version is 2.51.0, got %s", spec.RayVersion)
return fmt.Errorf("authOptions.mode is 'token' but minimum Ray version is 2.52.0, got %s", spec.RayVersion)
}

}
Expand Down
9 changes: 2 additions & 7 deletions ray-operator/controllers/ray/utils/validation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -858,11 +858,6 @@ func TestValidateRayClusterSpecRayVersionForAuth(t *testing.T) {
errorMessage string
expectError bool
}{
{
name: "Valid Ray version 2.51.0",
rayVersion: "2.51.0",
expectError: false,
},
{
name: "Valid Ray version 2.52.0",
rayVersion: "2.52.0",
Expand All @@ -877,7 +872,7 @@ func TestValidateRayClusterSpecRayVersionForAuth(t *testing.T) {
name: "Invalid Ray version 2.50.0",
rayVersion: "2.50.0",
expectError: true,
errorMessage: "authOptions.mode is 'token' but minimum Ray version is 2.51.0, got 2.50.0",
errorMessage: "authOptions.mode is 'token' but minimum Ray version is 2.52.0, got 2.50.0",
},
{
name: "Invalid Ray version format",
Expand All @@ -889,7 +884,7 @@ func TestValidateRayClusterSpecRayVersionForAuth(t *testing.T) {
name: "Empty Ray version",
rayVersion: "",
expectError: true,
errorMessage: "authOptions.mode is 'token' but RayVersion was not specified. Ray version 2.51.0 or later is required",
errorMessage: "authOptions.mode is 'token' but RayVersion was not specified. Ray version 2.52.0 or later is required",
},
}

Expand Down
2 changes: 1 addition & 1 deletion ray-operator/test/e2e/raycluster_auth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func TestRayClusterAuthOptions(t *testing.T) {
t.Parallel()

rayClusterAC := rayv1ac.RayCluster("raycluster-auth-token", namespace.Name).
WithSpec(NewRayClusterSpecWithAuth(rayv1.AuthModeToken).WithRayVersion("2.51"))
WithSpec(NewRayClusterSpecWithAuth(rayv1.AuthModeToken).WithRayVersion("2.52"))

rayCluster, err := test.Client().Ray().RayV1().RayClusters(namespace.Name).Apply(test.Ctx(), rayClusterAC, TestApplyOptions)
g.Expect(err).NotTo(HaveOccurred())
Expand Down
Loading