Repository navigation
[build-tools] Reject iOS Simulator UDIDs in device run sessions - #5002
krystofwoldrich wants to merge 2 commits into
Conversation
The session images get new Simulator UDIDs each time they are updated, so a session can only select its iOS Simulator by name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5002 +/- ##
==========================================
+ Coverage 77.92% 77.92% +0.01%
==========================================
Files 1146 1147 +1
Lines 58699 58710 +11
Branches 13045 13049 +4
==========================================
+ Hits 45735 45746 +11
Misses 12844 12844
Partials 120 120 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
✅ Thank you for adding a changeset! |
szdziedzic
left a comment
There was a problem hiding this comment.
LGTM! Forbidding iOS Simulator UDIDs upfront in all four remote session steps before startup watch, warm claim, or boot is much cleaner than accepting ephemeral image-specific UDIDs, and consolidating IOS_SIMULATOR_UDID_PATTERN into iosSimulatorUdid.ts removes the duplicate regex cleanly.
(Minor non-blocking note: standalone eas/start_ios_simulator workflows still go through IosSimulatorUtils.resolveUdidAsync, which passes UDIDs straight through without checking simctl list, but that's separate from remote sessions and can be left as-is or hardened independently if needed.)
Why
A UDID read from one session only works until we update the session image, since every image update gives the Simulators new UDIDs. Sessions shouldn't break on the next image update, so we only accept names now.
Related PRs
eas simulator:start --deviceThis set of PRs supersedes #4992 and https://github.com/expo/universe/pull/33935.
How
The agent-device, Appium, Argent and web preview session steps check
device_identifieron macOS before they watch startup, claim the warm Simulator or boot anything. A UDID fails with aUserErrorthat asks for a name like "iPhone 17 Pro". UDIDs we pick ourselves (warm Simulator, default iPhone) still pass, and the UDID regex now lives in one module.Test plan
The new tests run each of the four session steps with a UDID and check that it fails before the startup watch, the warm claim and the boot. They also check that a UDID shaped value on Android passes through. After this ships to the workers, an iOS session with
iPhone 17 Proor with no device should start the same as before.