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

Fix ML stale element failure on cloud #140326

Merged
merged 1 commit into from
Sep 9, 2022

Conversation

liza-mae
Copy link
Contributor

@liza-mae liza-mae commented Sep 8, 2022

In #139964 Spencer added a retry method for clickWhenNotDisabled, we need to use this method in ML tests to swallow up the stale element failures and reduce flakiness. The rest of the failures are cascading due to this root cause.

ML Failures: https://buildkite.com/elastic/estf-cloud-kibana-functional-tests/builds/629

[00:01:51]             └-> stops deployment of the imported model pt_tiny_fill_mask
[00:01:51]               └-> "before each" hook: global before each for "stops deployment of the imported model pt_tiny_fill_mask"
[00:01:51]               │ debg TestSubjects.clickWhenNotDisabled(~mlModelsTable > ~row-pt_tiny_fill_mask > mlModelsTableRowStopDeploymentAction)
[00:01:51]               │ debg Find.clickByCssSelectorWhenNotDisabled('[data-test-subj~="mlModelsTable"] [data-test-subj~="row-pt_tiny_fill_mask"] [data-test-subj="mlModelsTableRowStopDeploymentAction"]') with timeout=5000
[00:01:51]               │ debg Find.findByCssSelector('[data-test-subj~="mlModelsTable"] [data-test-subj~="row-pt_tiny_fill_mask"] [data-test-subj="mlModelsTableRowStopDeploymentAction"]') with timeout=5000
[00:01:52]               │ info Taking screenshot "/opt/local-ssd/buildkite/builds/kb-n2-4-b41791103d8a3409/elastic/estf-cloud-kibana-functional-tests/kibana/x-pack/test/functional/screenshots/failure/machine learning - short tests model management trained models for ML power user-d44af9c4490010e531776d6573a7e6154e31c01c46dc701d1ccf7f09781117f4.png"
[00:01:52]               │ info Current URL is: https://estf-deployment-ci-3762256a-a8ed-466d-8a0e-c8233af.kb.us-west2.gcp.elastic-cloud.com:9243/app/ml/trained_models?_a=(trained_models%3A(pageIndex%3A0%2CpageSize%3A10%2CqueryText%3Apt_tiny_fill_mask%2CsortDirection%3Aasc%2CsortField%3Amodel_id))
[00:01:52]               │ info Saving page source to: /opt/local-ssd/buildkite/builds/kb-n2-4-b41791103d8a3409/elastic/estf-cloud-kibana-functional-tests/kibana/x-pack/test/functional/failure_debug/html/machine learning - short tests model management trained models for ML power user-d44af9c4490010e531776d6573a7e6154e31c01c46dc701d1ccf7f09781117f4.html
[00:01:52]               └- ✖ fail: machine learning - short tests model management trained models for ML power user with imported models stops deployment of the imported model pt_tiny_fill_mask
[00:01:52]               │      StaleElementReferenceError: stale element reference: element is not attached to the page document
[00:01:52]               │   (Session info: headless chrome=105.0.5195.52)
[00:01:52]               │       at Object.throwDecodedError (node_modules/selenium-webdriver/lib/error.js:522:15)
[00:01:52]               │       at parseHttpResponse (node_modules/selenium-webdriver/lib/http.js:589:13)
[00:01:52]               │       at Executor.execute (node_modules/selenium-webdriver/lib/http.js:514:28)
[00:01:52]               │       at runMicrotasks (<anonymous>)
[00:01:52]               │       at processTicksAndRejections (node:internal/process/task_queues:96:5)
[00:01:52]               │       at Task.exec (test/functional/services/remote/prevent_parallel_calls.ts:28:20)
[00:01:52]               │ 

@liza-mae liza-mae requested a review from pheyos September 8, 2022 17:56
@liza-mae liza-mae self-assigned this Sep 8, 2022
@liza-mae liza-mae requested a review from a team as a code owner September 8, 2022 17:56
@liza-mae liza-mae added v8.5.0 release_note:skip Skip the PR/issue when compiling release notes backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) test-cloud labels Sep 8, 2022
@liza-mae liza-mae changed the title Fix ML stale element failure Fix ML stale element failure on cloud Sep 8, 2022
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

✅ unchanged

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @liza-mae

Copy link
Member

@pheyos pheyos left a comment

Choose a reason for hiding this comment

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

LGTM
It's interesting that I haven't seen these stale element issues during our cloud tests. Maybe it's cloud region related or a transient issue. However, it doesn't hurt to use the new version of that method with retries here.

@liza-mae liza-mae merged commit b3e01c6 into elastic:main Sep 9, 2022
@liza-mae liza-mae deleted the liza/fix-ml-failure branch September 9, 2022 15:09
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Sep 9, 2022
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.4

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Sep 9, 2022
(cherry picked from commit b3e01c6)

Co-authored-by: liza-mae <liza-mae@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) release_note:skip Skip the PR/issue when compiling release notes test-cloud v8.4.2 v8.5.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants