[build-tools] Restore maestro-runner WDA cache - #4195
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4195 +/- ##
==========================================
+ Coverage 63.39% 63.43% +0.05%
==========================================
Files 1027 1029 +2
Lines 46881 46949 +68
Branches 9834 9847 +13
==========================================
+ Hits 29715 29777 +62
+ Misses 17064 17056 -8
- Partials 102 116 +14 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
⏩ The changelog entry check has been skipped since the "no changelog" label is present. |
There was a problem hiding this comment.
Pull request overview
This PR restores a prebuilt WebDriverAgent (WDA) cache for maestro-runner on macOS build runtimes to avoid the first-run WDA compilation cost, by downloading an archive from turtle-v2 (optionally via a proxy) and materializing per-iOS-runtime cache directories. It also factors out shared proxy URL rewriting logic and adds small iOS/Xcode utility helpers with tests.
Changes:
- Add WDA cache installation to
eas/install_maestroformaestro-runneron Darwin (download + extract + copy to runtime-specific cache paths). - Add utilities to detect Xcode version and available iOS simulator runtime versions (with unit tests).
- Extract
getProxiedDownloadUrlinto a shared utility and reuse it from xcactivitylog parsing.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/build-tools/src/utils/IosSimulatorUtils.ts | Adds a helper to list available iOS runtime versions via xcrun simctl. |
| packages/build-tools/src/utils/download.ts | Introduces shared proxy URL rewriting helper for GCS downloads. |
| packages/build-tools/src/utils/tests/IosSimulatorUtils.test.ts | Adds unit coverage for the new runtime-version helper. |
| packages/build-tools/src/steps/utils/ios/xcactivitylog.ts | Reuses shared proxy URL helper instead of local implementation. |
| packages/build-tools/src/steps/functions/installMaestro.ts | Implements optimistic WDA cache download/extract/copy for maestro-runner on macOS. |
| packages/build-tools/src/steps/functions/tests/installMaestro.test.ts | Adds tests validating WDA cache installation + fallback behavior. |
| packages/build-tools/src/ios/xcode.ts | Adds a helper to parse Xcode version from xcodebuild -version. |
| packages/build-tools/src/ios/tests/xcode.test.ts | Adds unit tests for Xcode version parsing + error case. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| const parsedUrl = new URL(directUrl); | ||
| return directUrl.replace( | ||
| `${parsedUrl.protocol}//${parsedUrl.host}`, | ||
| `${proxyBaseUrl}/${parsedUrl.host}` | ||
| ); |
Why
maestro-runnerneeds WDA driver to run tests. By default it compiles it on first run which takes a minute.How
Compiled WDA on all images, uploaded to
turtle-v2GCS and added optimistic download toeas/install_maestro. See https://github.com/expo/turtle-v2/pull/2603.Test plan
https://staging.expo.dev/accounts/expo-services/projects/workflows-testing/workflows/01a0009e-b171-7497-9335-af1fc470a8d5