-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Fix iOS device test random launch failures with improved retry logic and timeouts #30796
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
Conversation
…and timeouts Co-authored-by: rmarinho <[email protected]>
|
/azp run MAUI-DeviceTests-public |
|
Azure Pipelines successfully started running 1 pipeline(s). |
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.
Pull Request Overview
This PR addresses intermittent iOS device test failures on CI by implementing improved retry logic and dynamic timeouts specifically for app launch failures. The changes target the root cause of simulator launch timeouts that were causing random test failures.
Key Changes:
- Added iOS to pipeline-level retry configuration to match Android/Windows behavior
- Implemented dynamic launch timeouts (10 minutes for CI vs 6 minutes locally)
- Enhanced retry logic with intelligent launch failure detection and strategic delays
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| eng/pipelines/common/device-tests-steps.yml | Added iOS to platforms that get pipeline-level retry on task failure |
| eng/devices/ios.cake | Implemented dynamic launch timeout configuration based on CI environment |
| eng/devices/devices-shared.cake | Added launch failure detection function and enhanced retry logic with delays |
Co-authored-by: Copilot <[email protected]>
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
Having the error /mnt/vss/_work/1/s/eng/devices/devices-shared.cake(328,29): error CS0119: 'ScriptHost.Task(string)' is a method, which is not valid in the given context I think we can t use Task.Delay |
Co-authored-by: rmarinho <[email protected]>
Fixed in commit 7894cb7. Replaced |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
Note
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!
Problem
iOS device tests were experiencing random failures on CI where apps fail to start after installation with xharness:
These failures were intermittent - the same CI machines could have both successful and failed runs, indicating timing and resource-related issues rather than fundamental problems.
Root Cause
The failures occurred due to:
retryCountOnTaskFailureconfiguration that Android/Windows hadSolution
1. Dynamic Launch Timeout Configuration
2. Intelligent Launch Failure Detection
Added
IsSimulatorLaunchFailure()function to specifically detect launch failures:3. Enhanced Retry Logic
4. Pipeline-Level Safety Net
Added iOS to platforms that get
retryCountOnTaskFailure: 1(was missing compared to Android/Windows).Impact
Validation
The fix provides multiple safety nets while maintaining backward compatibility and addressing the intermittent nature of the simulator launch issues.
Fixes #30795.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.