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: Chrome X-Pack UI Functional Tests.x-pack/test/functional/apps/lens/runtime_fields·ts - lens app lens runtime fields should be able to add runtime field and use it #107854

Closed
kibanamachine opened this issue Aug 7, 2021 · 19 comments · Fixed by #118311, #126945 or #127979
Assignees
Labels
failed-test A test failure on a tracked branch, potentially flaky-test Feature:Lens Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@kibanamachine
Copy link
Contributor

kibanamachine commented Aug 7, 2021

A test failed on a tracked branch

Error: retry.try timeout: Error: retry.try timeout: ElementClickInterceptedError: element click intercepted: Element <input class="euiFieldText euiFieldText--fullWidth lnsInnerIndexPatternDataPanel__textField" data-test-subj="lnsIndexPatternFieldSearch" placeholder="Search field names" aria-label="Search field names" aria-describedby="datapanel_d21c4e31-f78a-11eb-93f6-01d295207dfb" value=""> is not clickable at point (152, 281). Other element would receive the click: <div class="euiOverlayMask euiOverlayMask--belowHeader">...</div>
  (Session info: headless chrome=92.0.4515.131)
    at Object.throwDecodedError (/dev/shm/workspace/parallel/9/kibana/node_modules/selenium-webdriver/lib/error.js:550:15)
    at parseHttpResponse (/dev/shm/workspace/parallel/9/kibana/node_modules/selenium-webdriver/lib/http.js:565:13)
    at Executor.execute (/dev/shm/workspace/parallel/9/kibana/node_modules/selenium-webdriver/lib/http.js:491:26)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at Task.exec (/dev/shm/workspace/parallel/9/kibana/test/functional/services/remote/prevent_parallel_calls.ts:28:20)
    at onFailure (/dev/shm/workspace/parallel/9/kibana/test/common/services/retry/retry_for_success.ts:17:9)
    at retryForSuccess (/dev/shm/workspace/parallel/9/kibana/test/common/services/retry/retry_for_success.ts:57:13)
    at RetryService.try (/dev/shm/workspace/parallel/9/kibana/test/common/services/retry/retry.ts:31:12)
    at Proxy.clickByCssSelector (/dev/shm/workspace/parallel/9/kibana/test/functional/services/common/find.ts:360:5)
    at TestSubjects.click (/dev/shm/workspace/parallel/9/kibana/test/functional/services/common/test_subjects.ts:105:5)
    at /dev/shm/workspace/parallel/9/kibana/test/functional/services/common/test_subjects.ts:205:7
    at runAttempt (/dev/shm/workspace/parallel/9/kibana/test/common/services/retry/retry_for_success.ts:27:15)
    at retryForSuccess (/dev/shm/workspace/parallel/9/kibana/test/common/services/retry/retry_for_success.ts:66:21)
    at RetryService.try (/dev/shm/workspace/parallel/9/kibana/test/common/services/retry/retry.ts:31:12)
    at TestSubjects.setValue (/dev/shm/workspace/parallel/9/kibana/test/functional/services/common/test_subjects.ts:202:12)
    at Object.searchField (test/functional/page_objects/lens_page.ts:234:7)
    at Context.<anonymous> (test/functional/apps/lens/runtime_fields.ts:28:7)
    at Object.apply (/dev/shm/workspace/parallel/9/kibana/node_modules/@kbn/test/target_node/functional_test_runner/lib/mocha/wrap_function.js:87:16)
    at onFailure (/dev/shm/workspace/parallel/9/kibana/test/common/services/retry/retry_for_success.ts:17:9)
    at retryForSuccess (/dev/shm/workspace/parallel/9/kibana/test/common/services/retry/retry_for_success.ts:57:13)
    at RetryService.try (/dev/shm/workspace/parallel/9/kibana/test/common/services/retry/retry.ts:31:12)
    at TestSubjects.setValue (/dev/shm/workspace/parallel/9/kibana/test/functional/services/common/test_subjects.ts:202:12)
    at Object.searchField (test/functional/page_objects/lens_page.ts:234:7)
    at Context.<anonymous> (test/functional/apps/lens/runtime_fields.ts:28:7)
    at Object.apply (/dev/shm/workspace/parallel/9/kibana/node_modules/@kbn/test/target_node/functional_test_runner/lib/mocha/wrap_function.js:87:16)

First failure: Jenkins Build

@kibanamachine kibanamachine added the failed-test A test failure on a tracked branch, potentially flaky-test label Aug 7, 2021
@botelastic botelastic bot added the needs-team Issues missing a team label label Aug 7, 2021
@stratoula stratoula added Feature:Lens Team:Visualizations Visualization editors, elastic-charts and infrastructure labels Aug 9, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

@botelastic botelastic bot removed the needs-team Issues missing a team label label Aug 9, 2021
@stratoula
Copy link
Contributor

I will close it for now as it has failed only once and it could potentially be fixed by #108653

@kibanamachine
Copy link
Contributor Author

New failure: Jenkins Build

@kibanamachine kibanamachine reopened this Sep 10, 2021
@kibanamachine
Copy link
Contributor Author

New failure: Jenkins Build

@flash1293
Copy link
Contributor

It seems like this is failing because of some race condition with entering the script:
Screenshot 2021-09-14 at 10 06 26

@mattkime do you have an idea how this could happen? emit('abc') should be perfectly valid. Maybe we have to type with a delay of 100ms or something?

@mattkime
Copy link
Contributor

I'm not sure but maybe @sebelga has an idea. Otherwise I can dig in deeper.

@kibanamachine
Copy link
Contributor Author

New failure: CI Build

@sebelga
Copy link
Contributor

sebelga commented Sep 20, 2021

I've had to fix a few race conditions while currently working on #109233. Once that PR will be merged it could solve this current issue. But... it is not guaranteed as the functional test needs to take into account timeouts/delays in place to validate the script (maybe it does but I haven't looked at the failing test).

For indo: there is a 500ms debounce to validate the Painless syntax (no HTTP request, just Monaco validating Painless) and then once it is validated there is another 500ms debounce before making the API request to validate the script in ES. Which in turn has its own delay. So it is not a "click and save runtime field" with an immediate assert. The functional test needs to take into accounts those delays.

I suggest we first wait for my PR to be merged before addressing the functional test. 👍

@flash1293
Copy link
Contributor

I didn't think it's about clicking the save button too fast, I suspected an issue within the monaco validation if the script is typed very fast. Something like:

  • Selenium types emit(' - validation starts running
  • Selenium types abc') - first validation still in progress, so it's not kicking off a new validation run
  • First validation fails and shows error
  • Result: Valid script in the editor, but error state

@sebelga
Copy link
Contributor

sebelga commented Sep 20, 2021

I see, makes sense thanks for clarifying. I did make some slight update on how the validation is triggered and making sure the last validation call is the correct one (https://github.com/elastic/kibana/pull/109233/files#diff-e8f7632f9f81afdc17aa2042fb1298b260167c98a977d8d55bdc1fdff908f4aaR104). So then it might fix the functional test 👍

@flash1293
Copy link
Contributor

Cool, @sebelga I will wait for this Pr and close the test issue

@flash1293 flash1293 self-assigned this Oct 28, 2021
@sebelga
Copy link
Contributor

sebelga commented Nov 2, 2021

@flash1293 In #109233 I had to fix the functional test service to write the script in the Monaco editor as Selenium was doing some strange unpredictable behaviour and the autocomplete from the editor (closing parenthesis for ex) was getting in the way of entering the painless script.

I am not sure if your functional test make use of the same typeScript service method to enter the script, if not you might have to make the same adjustment as I did here: https://github.com/elastic/kibana/pull/109233/files#diff-f922d555b123e2003c30ca0ed9c78cb59a09fea32b2ee524e820b1832aa69d96R41

@flash1293
Copy link
Contributor

@sebelga thanks for letting me know, once your PR is merged I'm going to take care of that.

@mattkime
Copy link
Contributor

mattkime commented Nov 3, 2021

@sebelga @flash1293 Might be helpful to break that out into its own function as it seems we should be using this every time we enter text into the monaco editor, at least when autocomplete is functional.

@kibanamachine
Copy link
Contributor Author

New failure: CI Build - main

@kibanamachine kibanamachine reopened this Feb 6, 2022
@flash1293
Copy link
Contributor

This is the first time this test failed this way (for some reason the newly created runtime field doesn't show up in the field list). Closing for now, if it comes back I will look into it.

@kibanamachine
Copy link
Contributor Author

New failure: CI Build - main

@kibanamachine
Copy link
Contributor Author

New failure: CI Build - 8.1

@kibanamachine
Copy link
Contributor Author

New failure: CI Build - main

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 Feature:Lens Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
6 participants