Bug 1901647

Summary: Monitoring: Alerts.Monitoring: Alerts "before all" hook for "displays and filters the Alerts list page, links to detail pages"
Product: OpenShift Container Platform Reporter: Lokesh Mandvekar <lsm5>
Component: MonitoringAssignee: Andrew Pickering <anpicker>
Status: CLOSED DUPLICATE QA Contact: Junqi Zhao <juzhao>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.7CC: alegrand, anpicker, erooth, kakkoyun, lcosic, mloibl, pkrupa, surbania
Target Milestone: ---   
Target Release: 4.7.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Monitoring: Alerts.Monitoring: Alerts "before all" hook for "displays and filters the Alerts list page, links to detail pages"
Last Closed: 2020-11-26 09:20:47 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Lokesh Mandvekar 2020-11-25 17:53:09 UTC
test:
Monitoring: Alerts.Monitoring: Alerts "before all" hook for "displays and filters the Alerts list page, links to detail pages" 

is failing frequently in CI, see search results:
https://search.ci.openshift.org/?maxAge=168h&context=1&type=bug%2Bjunit&name=&maxMatches=5&maxBytes=20971520&groupBy=job&search=Monitoring%3A+Alerts%5C.Monitoring%3A+Alerts+%22before+all%22+hook+for+%22displays+and+filters+the+Alerts+list+page%2C+links+to+detail+pages%22

https://prow.ci.openshift.org/view/gs/origin-ci-test/logs/release-openshift-ocp-installer-console-aws-4.7/1331565108702220288


The Build Log in the CI URL contains error messages similar to Bug 1901594



"before all" hook for "successfully displays view for route: /": Visiting other routes "before all" hook for "successfully displays view for route: /" expand_less 	0s
AssertionError: Timed out retrying: Expected to find element: `[data-test-id="login"]`, but never found it.

Because this error occurred during a `before all` hook we are skipping the remaining tests in the current suite: `Visiting other routes`

Although you have test retries enabled, we do not retry tests when `before all` or `after all` hooks fail
    at Context.eval (https://console-openshift-console.apps.ci-op-sbm6qvsp-c22bb.origin-ci-int-aws.dev.rhcloud.com/__cypress/tests?p=tests/crud/other-routes.spec.ts:12999:32)
"before all" hook for "displays and filters the Alerts list page, links to detail pages": Monitoring: Alerts "before all" hook for "displays and filters the Alerts list page, links to detail pages" expand_less 	0s
AssertionError: Timed out retrying: Expected to find element: `[data-test="item-create"]`, but never found it.

Because this error occurred during a `before all` hook we are skipping the remaining tests in the current suite: `Monitoring: Alerts`

Although you have test retries enabled, we do not retry tests when `before all` or `after all` hooks fail
    at Context.eval (https://console-openshift-console.apps.ci-op-sbm6qvsp-c22bb.origin-ci-int-aws.dev.rhcloud.com/__cypress/tests?p=tests/monitoring/monitoring.spec.ts:2251:8)
"after all" hook for "creates and expires a Silence": Monitoring: Alerts "after all" hook for "creates and expires a Silence" expand_less 	0s
AssertionError: Timed out retrying: Expected to find element: `[data-test-id="actions-menu-button"]`, but never found it.

Because this error occurred during a `after all` hook we are skipping the remaining tests in the current suite: `Monitoring: Alerts`

Although you have test retries enabled, we do not retry tests when `before all` or `after all` hooks fail
    at Context.eval (https://console-openshift-console.apps.ci-op-sbm6qvsp-c22bb.origin-ci-int-aws.dev.rhcloud.com/__cypress/tests?p=tests/monitoring/monitoring.spec.ts:2255:57)
"before all" hook for "creates the resource instance": Kubernetes resource CRUD operations Pod "before all" hook for "creates the resource instance" expand_less 	0s
AssertionError: Timed out retrying: Expected to find element: `[data-test="item-create"]`, but never found it.

Because this error occurred during a `before all` hook we are skipping the remaining tests in the current suite: `Kubernetes resource CRUD op...`

Although you have test retries enabled, we do not retry tests when `before all` or `after all` hooks fail
    at Context.eval (https://console-openshift-console.apps.ci-op-sbm6qvsp-c22bb.origin-ci-int-aws.dev.rhcloud.com/__cypress/tests?p=tests/crud/k8-openshift-cruds.spec.ts:37304:8)
"after all" hook for "deletes the resource instance": Kubernetes resource CRUD operations user.openshift.io~v1~Group "after all" hook for "deletes the resource instance" expand_less 	0s
AssertionError: Timed out retrying: Expected to find element: `[data-test-id="actions-menu-button"]`, but never found it.

Because this error occurred during a `after all` hook we are skipping the remaining tests in the current suite: `Kubernetes resource CRUD op...`

Although you have test retries enabled, we do not retry tests when `before all` or `after all` hooks fail
    at Context.eval (https://console-openshift-console.apps.ci-op-sbm6qvsp-c22bb.origin-ci-int-aws.dev.rhcloud.com/__cypress/tests?p=tests/crud/k8-openshift-cruds.spec.ts:37308:57)
"before all" hook for "lists, creates, and deletes": Namespace "before all" hook for "lists, creates, and deletes" expand_less 	0s
AssertionError: Timed out retrying: Expected to find element: `[data-test-id="login"]`, but never found it.

Because this error occurred during a `before all` hook we are skipping the remaining tests in the current suite: `Namespace`

Although you have test retries enabled, we do not retry tests when `before all` or `after all` hooks fail
    at Context.eval (https://console-openshift-console.apps.ci-op-sbm6qvsp-c22bb.origin-ci-int-aws.dev.rhcloud.com/__cypress/tests?p=tests/crud/namespace-crud.spec.ts:12999:32)
"after all" hook for "lists, creates, and deletes": Namespace "after all" hook for "lists, creates, and deletes" expand_less 	0s
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: `Namespace`

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-sbm6qvsp-c22bb.origin-ci-int-aws.dev.rhcloud.com/__cypress/runner/cypress_runner.js:160849:24)
    at validateType (https://console-openshift-console.apps.ci-op-sbm6qvsp-c22bb.origin-ci-int-aws.dev.rhcloud.com/__cypress/runner/cypress_runner.js:160673:16)
    at Object.ensureSubjectByType (https://console-openshift-console.apps.ci-op-sbm6qvsp-c22bb.origin-ci-int-aws.dev.rhcloud.com/__cypress/runner/cypress_runner.js:160715:11)
    at pushSubjectAndValidate (https://console-openshift-console.apps.ci-op-sbm6qvsp-c22bb.origin-ci-int-aws.dev.rhcloud.com/__cypress/runner/cypress_runner.js:168479:15)
    at Context.<anonymous> (https://console-openshift-console.apps.ci-op-sbm6qvsp-c22bb.origin-ci-int-aws.dev.rhcloud.com/__cypress/runner/cypress_runner.js:168807:18)
From Your Spec Code:
    at Object.clickPageActionFromDropdown (https://console-openshift-console.apps.ci-op-sbm6qvsp-c22bb.origin-ci-int-aws.dev.rhcloud.com/__cypress/tests?p=tests/crud/namespace-crud.spec.ts:13025:50)
    at Context.eval (https://console-openshift-console.apps.ci-op-sbm6qvsp-c22bb.origin-ci-int-aws.dev.rhcloud.com/__cypress/tests?p=tests/crud/namespace-crud.spec.ts:13148:17)
: Run template e2e-aws-console - e2e-aws-console container test expand_less 	15m57s
    -        - │
  └────────────────────────────────────────────────────────────────────────────────────────────────┘
    ✖  4 of 8 failed (50%)                      04:31      208        9        6        -      193  

error Command failed with exit code 6.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
yarn run v1.21.0
$ yarn cypress-merge && yarn cypress-generate
$ mochawesome-merge ./gui_test_screenshots/cypress_report*.json > ./gui_test_screenshots/cypress.json
$ marge -o ./gui_test_screenshots/ -f cypress-report -t 'OpenShift Console Cypress Test Results' -p 'OpenShift Cypress Test Results' --showPassed false --assetsDir ./gui_test_screenshots/cypress/assets ./gui_test_screenshots/cypress.json

✓ Reports saved:
/go/src/github.com/openshift/console/frontend/gui_test_screenshots/cypress-report.html
Done in 1.52s.
yarn run v1.21.0
$ echo '
A11y Test Results:' && mv packages/integration-tests-cypress/cypress-a11y-report.json ./gui_test_screenshots/ && node -e "console.table(JSON.parse(require('fs').readFileSync(process.argv[1])));" ./gui_test_screenshots/cypress-a11y-report.json

A11y Test Results:
┌──────────────────┬────────┐
│     (index)      │ Values │
├──────────────────┼────────┤
│   numberChecks   │  '0'   │
│ numberViolations │  '0'   │
└──────────────────┴────────┘
Done in 0.20s.
+ copyArtifacts
+ '[' -d /tmp/artifacts ']'
+ '[' -d frontend/gui_test_screenshots ']'
++ pwd
+ echo 'Copying artifacts from /go/src/github.com/openshift/console...'
+ cp -r frontend/gui_test_screenshots /tmp/artifacts/gui_test_screenshots
Copying artifacts from /go/src/github.com/openshift/console...

Comment 1 Lokesh Mandvekar 2020-11-25 18:30:07 UTC
Other tests that fail similarly:
1. Namespace.Namespace "after all" hook for "lists, creates, and deletes"

2. Namespace.Namespace "before all" hook for "lists, creates, and deletes"

Comment 2 Lokesh Mandvekar 2020-11-25 18:40:19 UTC
(In reply to Lokesh Mandvekar from comment #1)
> Other tests that fail similarly:
> 1. Namespace.Namespace "after all" hook for "lists, creates, and deletes"

https://prow.ci.openshift.org/view/gs/origin-ci-test/logs/release-openshift-ocp-installer-console-aws-4.7/1331565108702220288
 
> 2. Namespace.Namespace "before all" hook for "lists, creates, and deletes"

https://prow.ci.openshift.org/view/gs/origin-ci-test/logs/release-openshift-ocp-installer-console-aws-4.7/1331565108702220288

3. Visiting other routes.Visiting other routes "before all" hook for "successfully displays view for route: /"


https://prow.ci.openshift.org/view/gs/origin-ci-test/logs/release-openshift-ocp-installer-console-aws-4.7/1331565108702220288

Seems to be the same link for all 3 failures.

Comment 3 Lili Cosic 2020-11-26 08:27:26 UTC
My suspicion its the same bug as the thanos query one, but did not notice that in the logs, so assigning to Andy as it might be FE issue?

Comment 4 Andrew Pickering 2020-11-26 09:20:47 UTC
Although this fails during the monitoring UI test suite, it looks to me like it never gets as far as the monitoring UI pages before failing.

I'm closing as a duplicate of https://bugzilla.redhat.com/show_bug.cgi?id=1901594 since both tickets appear to cover the same failure.

*** This bug has been marked as a duplicate of bug 1901594 ***