Skip to content

ci: fix saucelabs browser crashing due to idle timeout #23240

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

Merged

Conversation

devversion
Copy link
Member

@devversion devversion commented Jul 24, 2021

See commit message

@google-cla google-cla bot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Jul 24, 2021
@itea-dev
Copy link

Nit: hopeing => hoping

@devversion devversion force-pushed the ci/reduce-saucelabs-flakiness-and-duration branch from 2ecf1ac to 35073cb Compare July 24, 2021 16:23
@devversion devversion requested a review from crisbeto July 24, 2021 16:43
@devversion devversion added merge safe P2 The issue is important to a large percentage of users, with a workaround target: patch This PR is targeted for the next patch release labels Jul 24, 2021
@devversion devversion marked this pull request as ready for review July 24, 2021 16:43
@devversion devversion requested a review from a team as a code owner July 24, 2021 16:43
@devversion
Copy link
Member Author

Fixing the timeout/disconnect and updating to iOS14 reduced the 30min time to 10min

Copy link
Member

@crisbeto crisbeto left a comment

Choose a reason for hiding this comment

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

LGTM

@crisbeto crisbeto added the action: merge The PR is ready for merge by the caretaker label Jul 25, 2021
Copy link
Member

@josephperrott josephperrott left a comment

Choose a reason for hiding this comment

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

LGTM

In the past when the Angular Team reworked the Saucelabs
Karma launcher the Saucelabs Selenium heartbeat has been
removed in favor of people just increasing the Saucelabs
`idleTimeout` to the max minutes their test will run.

The `idleTimeout` is limited to a 16min right now, so we
need to get back to the approach relying on a Selenium heartbeat.
For reference: The heartbeat refers to the Karma launcher
performing an arbitrary Selenium command every X seconds. This
helps with keeping the Saucelabs browser alive.

Currently we exceed the `idleTimeout` of 16min and the browsers
start to crash. Karma re-starts the browser. This results in
increased time for the Saucelabs test to ~30min from ~15min. We
fix this by upating the Karma Saucelabs launcher to a version
that has been improved by the Saucelabs team. We were always
hestitant to updating because it took a lot effort to get the
Saucelabs karma launcher stable (in the past it was _super_ flaky
with the heartbeat and implementation), but it's worth another try
given we now exceed the ~16min due to more tests being added.

Long-term we want to switch the Saucelabs/Browserstack tests to
fine-grained Bazel test targets that can be tested incrementally.
There is work in progress for this, but it's not prioritized.

This commit additionally updates the Saucelabs test from iOS13
to iOS14 with a more recent emulator, hoping for better specs
of the Saucelabs VM and emulator.

Note: We also need to add a new Yarn resolution that updates
nested `https-proxy-agent` dependencies. Packages like the
browserstack launcher install old versions that patch the
NodeJS native `http.request` method and break `webdriverio`
starting a remote Saucelabs session.
@devversion devversion force-pushed the ci/reduce-saucelabs-flakiness-and-duration branch from 35073cb to 41976c0 Compare July 26, 2021 17:04
@mmalerba mmalerba merged commit 091305d into angular:master Jul 27, 2021
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Aug 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement P2 The issue is important to a large percentage of users, with a workaround target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants