-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[8.12] [ftr] abort retry on invalid webdriver session (#174092) #174129
Merged
kibanamachine
merged 1 commit into
elastic:8.12
from
kibanamachine:backport/8.12/pr-174092
Jan 2, 2024
Merged
[8.12] [ftr] abort retry on invalid webdriver session (#174092) #174129
kibanamachine
merged 1 commit into
elastic:8.12
from
kibanamachine:backport/8.12/pr-174092
Jan 2, 2024
+13
−2
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Summary Since many our e2e tests use Retry service, we might have a situation with retry running for some time (**20,30, 120 seconds** ) before reaching timeout while browser already crashed and Webdriver is not functioning properly. This PR updates Retry service with checking error name before retry attempt: if it is the WebDriver critical error, retry is aborted and we fail test fast. It should help with long useless logging messages as well: Before: ``` │ debg --- retry.try error: no such window: target window already closed │ from unknown error: web view not found │ (Session info: chrome=120.0.6099.129) │ debg Find.findByCssSelector('[data-test-subj="canvasExpressionInput"]') with timeout=10000 │ debg --- retry.try failed again with the same message... │ debg Find.findByCssSelector('[data-test-subj="canvasExpressionInput"]') with timeout=10000 │ debg --- retry.try failed again with the same message... ... │ERROR Browser is closed, no artifacts were captured for the failure └- ✖ fail: Canvas Canvas app expression editor shows autocomplete when typing │ retry.try timeout: NoSuchWindowError: no such window: target window already closed │ from unknown error: web view not found │ (Session info: chrome=120.0.6099.129) │ at Object.throwDecodedError (/Users/dmle/github/kibana/node_modules/selenium-webdriver/lib/error.js:524:15) │ at parseHttpResponse (/Users/dmle/github/kibana/node_modules/selenium-webdriver/lib/http.js:601:13) │ at Executor.execute (/Users/dmle/github/kibana/node_modules/selenium-webdriver/lib/http.js:529:28) │ at processTicksAndRejections (node:internal/process/task_queues:95:5) │ at Task.exec (prevent_parallel_calls.ts:28:20) │ Error: retry.try timeout: NoSuchWindowError: no such window: target window already closed │ from unknown error: web view not found │ (Session info: chrome=120.0.6099.129) │ at Object.throwDecodedError (node_modules/selenium-webdriver/lib/error.js:524:15) │ at parseHttpResponse (node_modules/selenium-webdriver/lib/http.js:601:13) │ at Executor.execute (node_modules/selenium-webdriver/lib/http.js:529:28) │ at processTicksAndRejections (node:internal/process/task_queues:95:5) │ at Task.exec (prevent_parallel_calls.ts:28:20) │ at onFailure (retry_for_success.ts:17:9) │ at retryForSuccess (retry_for_success.ts:59:13) │ at RetryService.try (retry.ts:31:12) │ at Proxy.clickByCssSelector (find.ts:417:5) │ at TestSubjects.click (test_subjects.ts:164:5) │ at Context.<anonymous> (expression.ts:92:7) │ at Object.apply (wrap_function.js:73:16) │ │ └-> "after all" hook for "shows autocomplete when typing" │ debg unloading docs from archive at /Users/dmle/github/kibana/x-pack/test/functional/fixtures/kbn_archiver/canvas/default.json │ info deleting 1 objects { space: undefined } │ succ 1 saved objects deleted └-> "after all" hook: afterTestSuite.trigger for "shows autocomplete when typing" │ERROR Browser window is already closed ``` After: ``` │ debg --- retry.try error: no such window: target window already closed │ from unknown error: web view not found │ (Session info: chrome=120.0.6099.129) │ERROR Browser is closed, no artifacts were captured for the failure └- ✖ fail: Canvas Canvas app expression editor shows autocomplete when typing │ Error: WebDriver session is invalid, retry was aborted │ at retryForSuccess (retry_for_success.ts:64:13) │ at RetryService.try (retry.ts:31:12) │ at MonacoEditorService.getCodeEditorValue (monaco_editor.ts:25:5) │ at Context.<anonymous> (expression.ts:83:34) │ at Object.apply (wrap_function.js:73:16) │ │ └-> "after all" hook for "shows autocomplete when typing" │ debg unloading docs from archive at /Users/dmle/github/kibana/x-pack/test/functional/fixtures/kbn_archiver/canvas/default.json │ info deleting 1 objects { space: undefined } │ succ 1 saved objects deleted └-> "after all" hook: afterTestSuite.trigger for "shows autocomplete when typing" │ERROR Browser window is already closed └-> "after all" hook in "Canvas app" │ debg set roles = superuser │ debg creating user test_user │ debg created user test_user └-> "after all" hook: afterTestSuite.trigger in "Canvas app" │ERROR Browser window is already closed └-> "after all" hook: afterTestSuite.trigger in "Canvas" │ERROR Browser window is already closed 5 passing (17.0s) 1 failing 1) Canvas Canvas app expression editor shows autocomplete when typing: Error: WebDriver session is invalid, retry was aborted at retryForSuccess (retry_for_success.ts:64:13) at RetryService.try (retry.ts:31:12) at MonacoEditorService.getCodeEditorValue (monaco_editor.ts:25:5) at Context.<anonymous> (expression.ts:83:34) at Object.apply (wrap_function.js:73:16) ``` (cherry picked from commit f9a4962)
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]
To update your PR or re-run it, just comment with: cc @dmlemeshko |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Backport
This will backport the following commits from
main
to8.12
:Questions ?
Please refer to the Backport tool documentation