Repository navigation
Conversation
iOS functional test jobs fail often on hosted macOS runners: the first Appium session on a freshly booted simulator times out, the simulator boot sometimes never finishes, and setup-uv can time out fetching its version manifest. - Set up Python, uv and dependencies before booting the simulator, and pin the uv version in every job. - Open Simulator.app after the boot, and cap the boot step at 20 min. - Warm up the simulator (install WDA, launch Safari once) and WDA (one throwaway Appium session) before the tests; the WDA warm-up never fails the job. - Retry session creation once in the iOS and Flutter fixtures when WDA fails to start. The XCUITest driver ignores wdaStartupRetries with usePreinstalledWDA, and deletes the failed session before raising. - Raise wdaLaunchTimeout to 240 s for the Safari tests. - Use read-only workflow token permissions; quote python-version values.
This file contains hidden or 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
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.
Summary
Makes the iOS functional test jobs (
ios_test,flutter_e2e_test/ flutter-ios) less flaky.What was failing
In 13 failed runs of this workflow (on a fork running the same workflow file), the Android jobs passed every time, and at least one iOS job failed in every run:
webdriver.Remoteon a freshly booted simulator either hit the client's 600 s read timeout (urllib3.exceptions.ReadTimeoutErroronPOST /session), or WDA failed withXCTDaemonErrorDomain Code=5 "Timed out attempting to launch app". Only the first session was affected; the next test's session usually started fine.xcrun simctl bootstatusfailed 4 of 4 attempts after about 30 min.setup-uvtimed out (1 failure) fetching the "latest" version manifest.Changes
uv syncbefore booting the simulator, and pin the uv version (UV_VERSION) in all jobs.test/functional/ios/helper/warm_up.py), so WDA's slow first launch happens there rather than in a test. The warm-up makes a single attempt with the tests' 600 s timeout and givesquit()a 15 s budget, so it normally finishes within its 12-minute step; the step iscontinue-on-error.create_session_with_wda_retry), for "Unable to launch WebDriverAgent" / "Unable to start WebDriverAgent session". The XCUITest driver ignoreswdaStartupRetrieswithusePreinstalledWDA, and deletes the failed session before raising, so a client-side retry is safe. A client-sideReadTimeoutErroris deliberately not retried: the server may still be creating that session.wdaLaunchTimeoutto 240 s, to give WDA more time to launch on a slow simulator.permissions: contents: readblock and quote thepython-versionvalues.Testing
ruff checkandruff format --checkare clean, the workflow YAML parses, and pytest collects the 14 iOS and Flutter functional tests.