Skip to content

[CI] Deflaky TestRayServiceSuspendDuringIncrementalUpgrade #5020

Description

@win5923

Description

https://buildkite.com/ray-project/ray-ecosystem-ci-kuberay-ci/builds/15947/canvas?jid=019f8226-29f2-48d0-98f2-e5c6c1f4c851&tab=artifacts

The e2e test TestRayServiceSuspendDuringIncrementalUpgrade is flaky. It intermittently fails when the test flips Spec.Suspend on the RayService, with a 409 Conflict:

    rayservice_suspend_test.go:67: 
        Unexpected error:
            <*errors.StatusError | 0xe8d925d2b40>: 
            Operation cannot be fulfilled on rayservices.ray.io "suspend-incremental-rayservice": the object has been modified; please apply your changes to the latest version and try again
            {
                ErrStatus: {
                    TypeMeta: {Kind: "", APIVersion: ""},
                    ListMeta: {
                        SelfLink: "",
                        ResourceVersion: "",
                        Continue: "",
                        RemainingItemCount: nil,
                        ShardInfo: nil,
                    },
                    Status: "Failure",
                    Message: "Operation cannot be fulfilled on rayservices.ray.io \"suspend-incremental-rayservice\": the object has been modified; please apply your changes to the latest version and try again",
                    Reason: "Conflict",
                    Details: {
                        Name: "suspend-incremental-rayservice",
                        Group: "ray.io",
                        Kind: "rayservices",
                        UID: "",
                        Causes: nil,
                        RetryAfterSeconds: 0,
                    },
                    Code: 409,
                },
            }
        occurred

LogWithTimestamp(test.T(), "Setting Spec.Suspend=true")
rayService, err = GetRayService(test, namespace.Name, rayServiceName)
g.Expect(err).NotTo(HaveOccurred())
rayService.Spec.Suspend = true
_, err = test.Client().Ray().RayV1().RayServices(namespace.Name).Update(test.Ctx(), rayService, metav1.UpdateOptions{})
g.Expect(err).NotTo(HaveOccurred())

According to #4915 (review), we should wrap both read-modify-write blocks in Eventually to prevent 409 error.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions