operator-controller icon indicating copy to clipboard operation
operator-controller copied to clipboard

E2E flakes in `test/e2e/install_test.go` on updating an operator

Open m1kola opened this issue 2 years ago • 1 comments

Example build here:

• [FAILED] [5.109 seconds]
Operator Install when An operator is installed from an operator catalog [It] handles upgrade edges correctly
/home/runner/work/operator-controller/operator-controller/test/e2e/install_test.go:177

  Timeline >>
  STEP: creating a valid Operator resource @ 10/04/23 16:22:30.334
  STEP: eventually reporting a successful resolution @ 10/04/23 16:22:30.344
  STEP: updating the Operator resource to a non-successor version @ 10/04/23 16:22:31.462
  STEP: eventually reporting an unsatisfiable resolution @ 10/04/23 16:22:31.593
  STEP: updating the Operator resource to a valid upgrade edge @ 10/04/23 16:22:31.776
  [FAILED] in [It] - /home/runner/work/operator-controller/operator-controller/test/e2e/install_test.go:209 @ 10/04/23 16:22:31.858
  << Timeline

  [FAILED] Expected success, but got an error:
      <*errors.StatusError | 0xc0004a6500>: 
      Operation cannot be fulfilled on operators.operators.operatorframework.io "operator-mndlpgtv": 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,
              },
              Status: "Failure",
              Message: "Operation cannot be fulfilled on operators.operators.operatorframework.io \"operator-mndlpgtv\": the object has been modified; please apply your changes to the latest version and try again",
              Reason: "Conflict",
              Details: {
                  Name: "operator-mndlpgtv",
                  Group: "operators.operatorframework.io",
                  Kind: "operators",
                  UID: "",
                  Causes: nil,
                  RetryAfterSeconds: 0,
              },
              Code: 409,
          },
      }
  In [It] at: /home/runner/work/operator-controller/operator-controller/test/e2e/install_test.go:209 @ 10/04/23 16:22:31.858
------------------------------

Summarizing 1 Failure:
  [FAIL] Operator Install when An operator is installed from an operator catalog [It] handles upgrade edges correctly
  /home/runner/work/operator-controller/operator-controller/test/e2e/install_test.go:209

I believe the solution would be to update the following lines (probably there are more) to use Eventually:

https://github.com/operator-framework/operator-controller/blob/6808a5020e579da6a5da0083bc066b1c1a63702d/test/e2e/install_test.go#L209

https://github.com/operator-framework/operator-controller/blob/6808a5020e579da6a5da0083bc066b1c1a63702d/test/e2e/install_test.go#L196

m1kola avatar Oct 04 '23 16:10 m1kola

We should use server-side apply instead of Update there.

joelanford avatar Oct 04 '23 18:10 joelanford

I think we can close this one - the test is long gone

m1kola avatar Jun 28 '24 10:06 m1kola