Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CONSOLE-3237: Add opt out when Console deletes operands #12234

Merged
merged 1 commit into from Jan 24, 2023

Conversation

zherman0
Copy link
Member

@zherman0 zherman0 commented Nov 3, 2022

Console deletes operands regardless of interdependency.
This is built from dtaylor's PR10279

Added the ability for an operator to "opt out" of deleting all operands using an annotation flag: console.openshift.io/disable-operand-delete: "true"

Steps to test:

  1. Using Console UI, create project "test-3237" and then go to Operator Hub and install Business Automation in namespace "test-3237"
  2. Go into operator details for business automation and create instance for kieapps
  3. From the operators installed page, use the kebab and select "uninstall operator"
  4. If the opt out flag is not set, then the new screens showing instructions to delete all operands will appear
    4a) If the opt out flag is set, then the uninstall should look and work as it previously did
  5. To change the opt out flag, use the following patch cmds:
    oc annotate csv businessautomation-operator.7.13.1-1 console.openshift.io/disable-operand-delete=true
    oc annotate csv businessautomation-operator.7.13.1-1 console.openshift.io/disable-operand-delete=false --overwrite

@jhadvig @dtaylor113

https://user-images.githubusercontent.com/12733153/139136191-b6aaa4e3-6849-45c2-95c1-c3aa986fcc8c.gif

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 3, 2022
@openshift-ci openshift-ci bot added component/olm Related to OLM kind/i18n Indicates issue or PR relates to internationalization or has content that needs to be translated labels Nov 3, 2022
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 3, 2022
@zherman0
Copy link
Member Author

zherman0 commented Nov 3, 2022

QE Approver
/assign @yapei

Docs Approver:
/assign @opayne1

PX Approver:
/assign @RickJWagner

@rhamilto
Copy link
Member

rhamilto commented Nov 3, 2022

@zherman0, it appears you need to re-run yarn i18n.

@openshift-ci openshift-ci bot added component/ceph Related to ceph-storage-plugin component/core Related to console core functionality component/dev-console Related to dev-console component/insights Related to insights plugin component/kubevirt Related to kubevirt-plugin component/lso Related to local-storage-operator-plugin component/pipelines Related to pipelines-plugin component/shared Related to console-shared component/topology Related to topology labels Nov 3, 2022
@zherman0
Copy link
Member Author

zherman0 commented Nov 3, 2022

Re-ran yarn i18n and quadrupled the number of files in this bug. I will leave the changes assuming this is an okay place to fix those i18n issues.

@zherman0 zherman0 changed the title CONSOLE-3237: Console deletes operands regardless of interdependency CONSOLE-3237: Add opt out when Console deletes operands Nov 3, 2022
@opayne1
Copy link

opayne1 commented Nov 3, 2022

/label docs-approved

@openshift-ci openshift-ci bot added the docs-approved Signifies that Docs has signed off on this PR label Nov 3, 2022
@zherman0
Copy link
Member Author

zherman0 commented Nov 3, 2022

/retest

@RickJWagner
Copy link

Thank you for the gif showing how things work.

/label px-approved

@openshift-ci openshift-ci bot added the px-approved Signifies that Product Support has signed off on this PR label Nov 3, 2022
@RickJWagner RickJWagner removed their assignment Nov 3, 2022
@zherman0
Copy link
Member Author

zherman0 commented Nov 3, 2022

/retest

@jhadvig
Copy link
Member

jhadvig commented Jan 3, 2023


  ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
  │ Tests:        2                                                                                │
  │ Passing:      0                                                                                │
  │ Failing:      1                                                                                │
  │ Pending:      0                                                                                │
  │ Skipped:      1                                                                                │
  │ Screenshots:  3                                                                                │
  │ Video:        true                                                                             │
  │ Duration:     1 minute, 16 seconds                                                             │
  │ Spec Ran:     app/auth-multiuser-login.spec.ts                                                 │
  └────────────────────────────────────────────────────────────────────────────────────────────────┘
  (Screenshots)
  -  /go/src/github.com/openshift/console/frontend/gui_test_screenshots/cypress/scree     (1280x720)
     nshots/app/auth-multiuser-login.spec.ts/Auth test -- logs in as 'test' user via                
     htpasswd identity provider -- after each hook (failed).png                                     
  -  /go/src/github.com/openshift/console/frontend/gui_test_screenshots/cypress/scree     (1280x720)
     nshots/app/auth-multiuser-login.spec.ts/Auth test -- logs in as 'test' user via                
     htpasswd identity provider (failed) (attempt 2).png                                            
  -  /go/src/github.com/openshift/console/frontend/gui_test_screenshots/cypress/scree     (1280x720)
     nshots/app/auth-multiuser-login.spec.ts/Auth test -- logs in as 'test' user via                
     htpasswd identity provider -- after each hook (failed) (attempt 2).png  

@jhadvig
Copy link
Member

jhadvig commented Jan 4, 2023

same error as before

@jcaianirh
Copy link
Member

/retest

@jhadvig
Copy link
Member

jhadvig commented Jan 5, 2023

  (Run Finished)
       Spec                                              Tests  Passing  Failing  Pending  Skipped  
  ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
  │ ✖  e2e/add-flow-ci.feature                  13:12       16        8        8        -        - │
  └────────────────────────────────────────────────────────────────────────────────────────────────┘
    ✖  1 of 1 failed (100%)                     13:12       16        8        8        -        -  

/retest

@jhadvig
Copy link
Member

jhadvig commented Jan 9, 2023


Failed Specs:
1) Interacting with the environment variable editor When a variable is added from a secret : shows the correct variables
   TimeoutError: Wait timed out after 15004ms
       at /go/src/github.com/openshift/console/frontend/node_modules/selenium-webdriver/lib/promise.js:2201:17
       at ManagedPromise.invokeCallback_ /go/src/github.com/openshift/console/frontend/node_modules/selenium-webdriver/lib/promise.js:1376:14
       at TaskQueue.execute_ /go/src/github.com/openshift/console/frontend/node_modules/selenium-webdriver/lib/promise.js:3084:14
       at TaskQueue.executeNext_ /go/src/github.com/openshift/console/frontend/node_modules/selenium-webdriver/lib/promise.js:3067:27
       at /go/src/github.com/openshift/console/frontend/node_modules/selenium-webdriver/lib/promise.js:2927:27
       at /go/src/github.com/openshift/console/frontend/node_modules/selenium-webdriver/lib/promise.js:668:7
       at runMicrotasks <anonymous>:null:null
       at processTicksAndRejections internal/process/task_queues.js:93:5

/retest

@jhadvig
Copy link
Member

jhadvig commented Jan 9, 2023

Testing uninstall of Business Automation Operator
  Logging in as kubeadmin
      create project
      install operator "Business Automation" in test-rzlcg
      go to operator overview panel
      go to the install form
      configure Operator install for single namespace
      verify namespace dropdown shows the "test-rzlcg" namespace
      verify Operator began installation
      navigate to OperatorHub in Namespace: test-rzlcg
      operator "Business Automation" should exist in openshift-operators
    1) "before all" hook for "installs Business Automation Operator and KieApp Instance, then navigates to Operator details page"
      delete project
    2) "after all" hook for "installs Business Automation Operator and KieApp Instance, then navigates to Operator details page"
  0 passing (4m)
  2 failing
  1) Testing uninstall of Business Automation Operator
       "before all" hook for "installs Business Automation Operator and KieApp Instance, then navigates to Operator details page":
     AssertionError: Timed out retrying after 180000ms: Expected to find element: `[data-test-operator-row="Business Automation"]`, but never found it.
Because this error occurred during a `before all` hook we are skipping the remaining tests in the current suite: `Testing uninstall of Busine...`
Although you have test retries enabled, we do not retry tests when `before all` or `after all` hooks fail
      at Object.installedSucceeded (https://console-openshift-console.apps.ci-op-2pnw5s9q-75d12.xxxxxxxxxxxxxxxxxxxxxx/__cypress/tests?p=tests/operator-uninstall.spec.ts:14277:65)
      at Context.eval (https://console-openshift-console.apps.ci-op-2pnw5s9q-75d12.xxxxxxxxxxxxxxxxxxxxxx/__cypress/tests?p=tests/operator-uninstall.spec.ts:14123:71)
  2) Testing uninstall of Business Automation Operator
       "after all" hook for "installs Business Automation Operator and KieApp Instance, then navigates to Operator details page":
     CypressError: `cy.click()` failed because it requires a DOM element.
The subject received was:
  > `undefined`
The previous command that ran was:
  > `cy.get()`
Because this error occurred during a `after all` hook we are skipping the remaining tests in the current suite: `Testing uninstall of Busine...`
Although you have test retries enabled, we do not retry tests when `before all` or `after all` hooks fail
      at ensureElement (https://console-openshift-console.apps.ci-op-2pnw5s9q-75d12.xxxxxxxxxxxxxxxxxxxxxx/__cypress/runner/cypress_runner.js:160549:85)
      at validateType (https://console-openshift-console.apps.ci-op-2pnw5s9q-75d12.xxxxxxxxxxxxxxxxxxxxxx/__cypress/runner/cypress_runner.js:160386:18)
      at Object.ensureSubjectByType (https://console-openshift-console.apps.ci-op-2pnw5s9q-75d12.xxxxxxxxxxxxxxxxxxxxxx/__cypress/runner/cypress_runner.js:160422:11)
      at pushSubjectAndValidate (https://console-openshift-console.apps.ci-op-2pnw5s9q-75d12.xxxxxxxxxxxxxxxxxxxxxx/__cypress/runner/cypress_runner.js:169527:17)
      at Context. (https://console-openshift-console.apps.ci-op-2pnw5s9q-75d12.xxxxxxxxxxxxxxxxxxxxxx/__cypress/runner/cypress_runner.js:169856:20)
  From Your Spec Code:
      at Object.clickPageActionFromDropdown (https://console-openshift-console.apps.ci-op-2pnw5s9q-75d12.xxxxxxxxxxxxxxxxxxxxxx/__cypress/tests?p=tests/operator-uninstall.spec.ts:13743:50)
      at Context.eval (https://console-openshift-console.apps.ci-op-2pnw5s9q-75d12.xxxxxxxxxxxxxxxxxxxxxx/__cypress/tests?p=tests/operator-uninstall.spec.ts:13601:69)

@zherman0
Copy link
Member Author

zherman0 commented Jan 9, 2023

/retest

@jhadvig
Copy link
Member

jhadvig commented Jan 10, 2023

error in the same test case. Looks like we have a catch on whats is the issue.
@zherman0 FYI

Testing uninstall of Business Automation Operator
  Logging in as kubeadmin
      create project
      install operator "Business Automation" in test-tzoca
      go to operator overview panel
      go to the install form
      configure Operator install for single namespace
      verify namespace dropdown shows the "test-tzoca" namespace
      verify Operator began installation
      navigate to OperatorHub in Namespace: test-tzoca
      operator "Business Automation" should exist in openshift-operators
      create operand "example-kieappk" for "Business Automation" in test-tzoca
      navigate to details page of operator "Business Automation"
      create a new operand
      operand "example-kieappk" should exist for "Business Automation" in test-tzoca
      navigate to details page of operator "Business Automation"
      navigate to the operand "Details" tab
      navigate to details page of operator "Business Automation"
    ✓ installs Business Automation Operator and KieApp Instance, then navigates to Operator details page (103269ms)
      navigate to details page of operator "Business Automation"
      attempt to uninstall the Operator
      open uninstall modal
      navigate to details page of operator "Business Automation"
    ✓ attempts to uninstall the Operator, shows 'Cannot load Operands' alert (10022ms)
      navigate to details page of operator "Business Automation"
      attempt to uninstall the Operator
      open uninstall modal
      navigate to details page of operator "Business Automation"
      navigate to details page of operator "Business Automation"
    1) "before each" hook for "attempts to uninstall the Operator, shows 'Error uninstalling Operator' alert"
      delete project
  Logging out
  2 passing (3m)
  1 failing
  1) Testing uninstall of Business Automation Operator
       "before each" hook for "attempts to uninstall the Operator, shows 'Error uninstalling Operator' alert":
     CypressError: Timed out retrying after 30050ms: `cy.click()` failed because this element:
`<a data-test="nav" class="pf-c-nav__link pf-m-current" href="/k8s/ns/test-tzoca/operators.coreos.com~v1alpha1~ClusterServiceVersion" aria-current="page">Install...</a>`
is being covered by another element:
`<div class="ReactModal__Overlay ReactModal__Overlay--after-open co-overlay">...</div>`
Fix this problem, or use {force: true} to disable error checking.
https://on.cypress.io/element-cannot-be-interacted-with
Because this error occurred during a `before each` hook we are skipping the remaining tests in the current suite: `Testing uninstall of Busine...`
      at $Cy.ensureDescendents (https://console-openshift-console.apps.ci-op-gi69p3l7-75d12.xxxxxxxxxxxxxxxxxxxxxx/__cypress/runner/cypress_runner.js:160669:87)
      at ensureDescendents (https://console-openshift-console.apps.ci-op-gi69p3l7-75d12.xxxxxxxxxxxxxxxxxxxxxx/__cypress/runner/cypress_runner.js:147543:8)
      at ensureDescendentsAndScroll (https://console-openshift-console.apps.ci-op-gi69p3l7-75d12.xxxxxxxxxxxxxxxxxxxxxx/__cypress/runner/cypress_runner.js:147550:14)
...

@jcaianirh
Copy link
Member

/retest

@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Jan 13, 2023
@jhadvig
Copy link
Member

jhadvig commented Jan 16, 2023

@zherman0 getting closer.

But still there is an issue:

  1) Testing uninstall of Business Automation Operator
       "before all" hook for "installs Business Automation Operator and KieApp Instance, then navigates to Operator details page":
     CypressError: Timed out retrying after 30050ms: `cy.click()` failed because this element is detached from the DOM.
`<a class="co-resource-item__resource-name" data-test-operand-link="example-kieappk" data-test="example-kieappk" href="/k8s/ns/test-oedxx/clusterserviceversions/businessautomation-operator.7.13.1-2/app.kiegroup.org~v2~KieApp/example-kieappk">example...</a>`

@openshift-ci openshift-ci bot added the kind/cypress Related to Cypress e2e integration testing label Jan 20, 2023
@jhadvig
Copy link
Member

jhadvig commented Jan 21, 2023

The uninstall tests passed. ✅ The descriptor test is failing due a none related issue
Screenshot 2023-01-21 at 12 33 24

@jcaianirh
Copy link
Member

/retest

4 similar comments
@jcaianirh
Copy link
Member

/retest

@jcaianirh
Copy link
Member

/retest

@jhadvig
Copy link
Member

jhadvig commented Jan 24, 2023

/retest

@jhadvig
Copy link
Member

jhadvig commented Jan 24, 2023

/retest

Copy link
Member

@jcaianirh jcaianirh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jan 24, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 24, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jcaianirh, jhadvig, zherman0

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@jhadvig
Copy link
Member

jhadvig commented Jan 24, 2023

/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 24, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 24, 2023

@zherman0: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@openshift-merge-robot openshift-merge-robot merged commit 8208836 into openshift:master Jan 24, 2023
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. component/ceph Related to ceph-storage-plugin component/core Related to console core functionality component/dev-console Related to dev-console component/insights Related to insights plugin component/kubevirt Related to kubevirt-plugin component/lso Related to local-storage-operator-plugin component/olm Related to OLM component/pipelines Related to pipelines-plugin component/shared Related to console-shared component/topology Related to topology docs-approved Signifies that Docs has signed off on this PR kind/cypress Related to Cypress e2e integration testing kind/i18n Indicates issue or PR relates to internationalization or has content that needs to be translated lgtm Indicates that a PR is ready to be merged. px-approved Signifies that Product Support has signed off on this PR qe-approved Signifies that QE has signed off on this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet