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

Failing test: X-Pack Search Sessions Integration.x-pack/test/search_sessions_integration/tests/apps/dashboard/async_search/save_search_session_relative_time·ts - Dashboard save a search sessions with relative time Saves and restores a session with relative time ranges #97701

Open
kibanamachine opened this issue Apr 20, 2021 · 47 comments · Fixed by #106163 or #153457
Assignees
Labels
failed-test A test failure on a tracked branch, potentially flaky-test impact:critical This issue should be addressed immediately due to a critical level of impact on the product. Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas

Comments

@kibanamachine
Copy link
Contributor

kibanamachine commented Apr 20, 2021

A test failed on a tracked branch

Error: retry.try timeout: Error: expected 9 to equal 11
    at Assertion.assert (/dev/shm/workspace/parallel/4/kibana/node_modules/@kbn/expect/expect.js:100:11)
    at Assertion.be.Assertion.equal (/dev/shm/workspace/parallel/4/kibana/node_modules/@kbn/expect/expect.js:227:8)
    at Assertion.be (/dev/shm/workspace/parallel/4/kibana/node_modules/@kbn/expect/expect.js:69:22)
    at /dev/shm/workspace/parallel/4/kibana/test/functional/services/dashboard/expectations.ts:210:43
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at runAttempt (/dev/shm/workspace/parallel/4/kibana/test/common/services/retry/retry_for_success.ts:27:15)
    at retryForSuccess (/dev/shm/workspace/parallel/4/kibana/test/common/services/retry/retry_for_success.ts:66:21)
    at Retry.try (/dev/shm/workspace/parallel/4/kibana/test/common/services/retry/retry.ts:32:14)
    at DashboardExpect.savedSearchRowCount (/dev/shm/workspace/parallel/4/kibana/test/functional/services/dashboard/expectations.ts:205:7)
    at checkSampleDashboardLoaded (test/search_sessions_integration/tests/apps/dashboard/async_search/save_search_session_relative_time.ts:96:5)
    at Context.<anonymous> (test/search_sessions_integration/tests/apps/dashboard/async_search/save_search_session_relative_time.ts:68:7)
    at Object.apply (/dev/shm/workspace/parallel/4/kibana/node_modules/@kbn/test/src/functional_test_runner/lib/mocha/wrap_function.js:73:16)
    at onFailure (/dev/shm/workspace/parallel/4/kibana/test/common/services/retry/retry_for_success.ts:17:9)
    at retryForSuccess (/dev/shm/workspace/parallel/4/kibana/test/common/services/retry/retry_for_success.ts:57:13)
    at Retry.try (/dev/shm/workspace/parallel/4/kibana/test/common/services/retry/retry.ts:32:14)
    at DashboardExpect.savedSearchRowCount (/dev/shm/workspace/parallel/4/kibana/test/functional/services/dashboard/expectations.ts:205:7)
    at checkSampleDashboardLoaded (test/search_sessions_integration/tests/apps/dashboard/async_search/save_search_session_relative_time.ts:96:5)
    at Context.<anonymous> (test/search_sessions_integration/tests/apps/dashboard/async_search/save_search_session_relative_time.ts:68:7)
    at Object.apply (/dev/shm/workspace/parallel/4/kibana/node_modules/@kbn/test/src/functional_test_runner/lib/mocha/wrap_function.js:73:16)

First failure: Jenkins Build

@kibanamachine kibanamachine added the failed-test A test failure on a tracked branch, potentially flaky-test label Apr 20, 2021
@botelastic botelastic bot added the needs-team Issues missing a team label label Apr 20, 2021
@tylersmalley tylersmalley added Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas and removed needs-team Issues missing a team label labels Apr 20, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-presentation (Team:Presentation)

@tylersmalley
Copy link
Contributor

Currently only three failures in the past week:

image

@kibanamachine
Copy link
Contributor Author

New failure: Jenkins Build

1 similar comment
@kibanamachine
Copy link
Contributor Author

New failure: Jenkins Build

@kibanamachine
Copy link
Contributor Author

New failure: Jenkins Build

1 similar comment
@kibanamachine
Copy link
Contributor Author

New failure: Jenkins Build

@kibanamachine
Copy link
Contributor Author

New failure: Jenkins Build

@kibanamachine
Copy link
Contributor Author

New failure: Jenkins Build

@kibanamachine
Copy link
Contributor Author

New failure: Jenkins Build

@kibanamachine
Copy link
Contributor Author

New failure: Jenkins Build

@kibanamachine
Copy link
Contributor Author

New failure: Jenkins Build

@kibanamachine
Copy link
Contributor Author

New failure: Jenkins Build

@kibanamachine
Copy link
Contributor Author

New failure: Jenkins Build

@kibanamachine
Copy link
Contributor Author

New failure: Jenkins Build

@kibanamachine
Copy link
Contributor Author

New failure: Jenkins Build

@kibanamachine
Copy link
Contributor Author

New failure: Jenkins Build

@kibanamachine
Copy link
Contributor Author

New failure: Jenkins Build

@kibanamachine
Copy link
Contributor Author

New failure: Jenkins Build

@kibanamachine
Copy link
Contributor Author

New failure: Jenkins Build

@kibanamachine
Copy link
Contributor Author

New failure: Jenkins Build

@kibanamachine
Copy link
Contributor Author

New failure: Jenkins Build

@kibanamachine
Copy link
Contributor Author

New failure: Jenkins Build

@kibanamachine
Copy link
Contributor Author

New failure: Jenkins Build

@kibanamachine
Copy link
Contributor Author

New failure: Jenkins Build

@kibanamachine
Copy link
Contributor Author

New failure: Jenkins Build

@kibanamachine
Copy link
Contributor Author

New failure: Jenkins Build

@kibanamachine
Copy link
Contributor Author

New failure: Jenkins Build

@kibanamachine
Copy link
Contributor Author

New failure: Jenkins Build

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-services (Team:AppServices)

@Dosant
Copy link
Contributor

Dosant commented Jul 19, 2021

A recent change that might have indirectly caused these failures: #104780

Looks like test failures aren't related to the search sessions, but all the tests just fail to load a flights sample dashboard. They report: "15 of 17 panels loaded".

These two panels in "no results state" are causing the problem, as they don't set a proper of data- attributes to let test suite know that they finished loading.

Dashboard save a search session with relative time Saves and restores a session with relative time ranges

I filed #106085 and as soon as this is fixed by @elastic/kibana-app , we can re-enable the test.

@wylieconlon, I am also not sure if this is a valid behaviour that those visualizations could produce a "No results" state with sample data. I assume you didn't hit this in the pr #104780 ? I am not sure if this is some kind of a race condition in lens code or if this is a valid possible behaviour with how sample data works. Do you maybe know? Otherwise, I think it worth creating an issue to investigate and make it clear?

Also a note: today the skipped test is passing, both locally and on ci: #106071 (comment)

@wylieconlon
Copy link
Contributor

@Dosant Yes I think you're right that #106085 is the cause, but there's something else that's special about those two panels: they are both using the time shift feature. Could that be related, since the data for all the other panels is loaded?

@Dosant
Copy link
Contributor

Dosant commented Jul 20, 2021

Could that be related, since the data for all the other panels are loaded?

I am not sure, but an important remark is that the empty state happens not when the test tries to restore a search session, but it happens and fails on the initial dashboard load.
So this could likely happen in any other test that would use sample flights data and this empty state is not related to search sessions functionality

@kibanamachine
Copy link
Contributor Author

New failure: CI Build - main

@kibanamachine
Copy link
Contributor Author

New failure: CI Build - 8.7

@Heenawter Heenawter added the impact:critical This issue should be addressed immediately due to a critical level of impact on the product. label Mar 20, 2023
@ThomThomson
Copy link
Contributor

ThomThomson commented Mar 21, 2023

It looks like this is a completely different failure this time:

  • delayed vs 1 week earlier and canceled vs 1 week earlier both loaded successfully:
    Dashboard save a search sessions with relative time Saves and restores a session-b4c489d42e7ac65d2f105a6a1742f3fb020baa14be6599d7ce487f55d8bf2de5
  • The error this time is: The element [data-test-subj="embeddableError"] was still present when it should have disappeared.

My guess is that one of the charts on this dashboard errored out, but it's difficult to tell which one at this point.

I think the next step is to replace instances of await testSubjects.missingOrFail('embeddableError'); with a method on the dashboard service that can actually report which panels have failed, then run a flaky test runner against this.

@Heenawter Heenawter self-assigned this Mar 21, 2023
Heenawter added a commit that referenced this issue Mar 24, 2023
Closes #97701

## Summary

This PR replaces all instances of `await
testSubjects.missingOrFail('embeddableError');` with a call to the new
`noErrorEmbeddablesPresent()` method from the `dashboardExpect` service.

This `noErrorEmbeddablesPresent()` method adds some extra debugging
logic to the error embeddable check where, if at least one error
embeddable is present, then both the panel title(s) and the relevant
error message(s) will be printed as part of the error that is thrown.

With these changes, if the attached flaky test fails again, we should at
least have some more information on **why** it failed.

### Flaky Test Runner

This was specifically only running the flaky
`save_search_session_relative_time.ts` test suite:

<a
href="https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2024"><img
src="https://user-images.githubusercontent.com/8698078/227240095-a336b03b-6499-4d80-8b60-5e325d54a4ae.png"/></a>


### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
jennypavlova pushed a commit to jennypavlova/kibana that referenced this issue Mar 24, 2023
…153457)

Closes elastic#97701

## Summary

This PR replaces all instances of `await
testSubjects.missingOrFail('embeddableError');` with a call to the new
`noErrorEmbeddablesPresent()` method from the `dashboardExpect` service.

This `noErrorEmbeddablesPresent()` method adds some extra debugging
logic to the error embeddable check where, if at least one error
embeddable is present, then both the panel title(s) and the relevant
error message(s) will be printed as part of the error that is thrown.

With these changes, if the attached flaky test fails again, we should at
least have some more information on **why** it failed.

### Flaky Test Runner

This was specifically only running the flaky
`save_search_session_relative_time.ts` test suite:

<a
href="https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2024"><img
src="https://user-images.githubusercontent.com/8698078/227240095-a336b03b-6499-4d80-8b60-5e325d54a4ae.png"/></a>


### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
@kibanamachine kibanamachine reopened this May 9, 2024
@kibanamachine
Copy link
Contributor Author

New failure: kibana-on-merge - main

@kibanamachine
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
failed-test A test failure on a tracked branch, potentially flaky-test impact:critical This issue should be addressed immediately due to a critical level of impact on the product. Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas
Projects
None yet
9 participants