-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[FTR] Switch to new browser headless mode #153828
Conversation
Checking stability of the adjusted discover, dashboard and maps tests in a flaky test runner job ... no failure in 50 runs each ✔️ |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
Recent failures were unrelated to this change (API integration tests don't use the headless browser). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Data Discovery changes LGTM 👍
@@ -99,9 +99,12 @@ function initChromiumOptions(browserType: Browsers, acceptInsecureCerts: boolean | |||
} | |||
|
|||
if (headlessBrowser === '1') { | |||
// Using the new headless mode (instead of `options.headless()`) | |||
// See: https://www.selenium.dev/blog/2023/headless-is-going-away/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Smart adding the link in the comment! 🎉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you provide some details into why these test changes are required? Did the screen size change for functional tests or something?
@nreese Indeed, the size of the browser content area changed with the new headless mode. Reading the article that describes how the new headless mode shares code with the headful version and also seeing how running in headful mode gives the same browser content dimensions (same as new headless, different from old headless), makes me suspect the following (although I haven't found a clear statement about it): When setting the browser window size during tests,
I hope that helps. Let me know if you want me to add more details. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kibana-gis changes LGTM
code review
Code LGTM, Tested locally on Mac OS:
|
An infra test started failing on new headless mode after a recent test change, again due to the slightly different browser size. Adjusted the browser size for this suite and started a flaky test runner job for the modified infra suite to check test stability... no failure in 50 runs ✔️ |
💚 Build Succeeded
Metrics [docs]Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: cc @pheyos |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Infra UI changes look good, thanks 🙂
💔 All backports failed
Manual backportTo create the backport manually run:
Questions ?Please refer to the Backport tool documentation |
Summary
This PR updates the way how we start the headless browser for testing.
The current way of starting in headless mode is eventually going away and the new headless mode offers more capabilities and stability, see https://www.selenium.dev/blog/2023/headless-is-going-away/ and https://developer.chrome.com/articles/new-headless/.
Test adjustments
All the adjusted discover, dashboard, maps and infra tests showed the same pattern during failure investigation that's around the fact that the new headless mode is closer to the regular / non-headless mode: