elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.7k stars 8.12k forks source link

[FLAKY ON MKI] x-pack/test_serverless/functional/test_suites/common/management/index_management/index_templates.ts #189191

Closed wayneseymour closed 6 days ago

wayneseymour commented 1 month ago

Summary

x-pack/test_serverless/functional/test_suites/common/management/index_management/index_templates.ts is failing sometimes.

It's not entirely deterministic, but our best guess is that the while the screen shot definitely shows the desired elements, but perhaps something is wrong in the DOM. (Caching (Shadow DOM?)?)

I personally tried to add a quick fix, but to no avail.

Error message

Error: retry.try reached timeout 120000 ms
TimeoutError: Waiting for element to be located By(css selector, [data-test-subj="stepTitle"])
Wait timed out after 10023ms
    at /root/.qaf/data/git/kibana/node_modules/selenium-webdriver/lib/webdriver.js:913:22
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at onFailure (retry_for_success.ts:17:9)
    at retryForSuccess (retry_for_success.ts:84:7)
    at RetryService.try (retry.ts:51:12)
    at Context. (index_templates.ts:103:9)
    at Object.apply (wrap_function.js:73:16)

Screenshot

Screenshot 2024-07-25 at 15 22 24

Command Line Used in Buildkite

node scripts/functional_test_runner.js --config x-pack/test_serverless/functional/test_suites/observability/common_configs/config.group1.ts --exclude-tag skipMKI --exclude-tag failsOnMKI --exclude-tag skipSvlOblt --info
elasticmachine commented 1 month ago

Pinging @elastic/kibana-management (Team:Kibana Management)

sabarasaba commented 3 weeks ago

I think the problem is in the test itself, we are filling the create index template form with data and submiting for creation. And the final assertion to see if it was created or not is to check if the stepTitle contains the name of the index template we tried to create but right after creation the user is sent to the index templates list and the details flyout is opened. This flyout has a different data-test-subj for rendering the title so the test times out.

// Right before we create the template: Screenshot 2024-08-12 at 09 46 23

// After the template is created: Screenshot 2024-08-12 at 09 46 41

The right fix for this would be to change the data-test-subj we are matching against in this line to be title.