Skip to content

[build-tools] Restore maestro-runner WDA cache - #4195

Open
sjchmiela wants to merge 3 commits into
mainfrom
stanley/download-maestro-runner-wda-cache
Open

[build-tools] Restore maestro-runner WDA cache#4195
sjchmiela wants to merge 3 commits into
mainfrom
stanley/download-maestro-runner-wda-cache

Conversation

@sjchmiela

@sjchmiela sjchmiela commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Why

maestro-runner needs 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-v2 GCS and added optimistic download to eas/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

@codecov

codecov Bot commented Aug 14, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 91.78082% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 63.43%. Comparing base (2a7cb5e) to head (d7a1aaa).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
.../build-tools/src/steps/functions/installMaestro.ts 87.50% 6 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sjchmiela sjchmiela added the no changelog PR that doesn't require a changelog entry label Aug 14, 2026
@sjchmiela
sjchmiela marked this pull request as ready for review August 14, 2026 14:19
@sjchmiela
sjchmiela requested review from hSATAC and a lite review from Copilot and removed request for hSATAC August 14, 2026 14:19
@github-actions

Copy link
Copy Markdown

⏩ The changelog entry check has been skipped since the "no changelog" label is present.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 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_maestro for maestro-runner on 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 getProxiedDownloadUrl into 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.

Comment on lines +12 to +16
const parsedUrl = new URL(directUrl);
return directUrl.replace(
`${parsedUrl.protocol}//${parsedUrl.host}`,
`${proxyBaseUrl}/${parsedUrl.host}`
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no changelog PR that doesn't require a changelog entry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants