Let a script hold a device claim while it runs simctl install or simctl launch itself
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 38/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- ios, typescript
- Ambito
- cli, mobile-dev
Direzione di ricerca
Start by reading the CLI implementations of install, boot and shutdown to understand how they take and release transient-exclusive claims, then compare that with the open/close session lifecycle. Decide which of the three proposed approaches best fits the stated requirement; done means a script can hold a claim while its simulator mutation runs, and the claim is released when that work ends without the unwanted session side effects.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Seen in 0.21.15, macOS, iOS simulators.
Problem
Our dev scripts install and relaunch a dev client on an iOS simulator with xcrun simctl install and xcrun simctl launch --terminate-running-process. Before each call, they read the claim file in ~/.agent-device/device-claims/ and refuse when another session holds the device.
Between that check and the simctl call, an agent-device client (an e2e run, or an IDE device panel) can take the claim. The install or relaunch then interrupts that session. The window is short, but a check that only our scripts honor cannot close it. The claim must come from agent-device.
What exists in 0.21.15, and why it does not fit
device status|releaseonly inspects or releases claims. No command takes one.install,bootandshutdowntake atransient-exclusiveclaim, but only for their own work. agent-device cannot run oursimctlcommand under that claim.open --session S --platform ios --udid Uwith no app holds a session claim untilclose --session S. As a reservation, it has these side effects:- it starts a daemon in the state dir;
keepHotcan startxcodebuild build-for-testingfor the runner in the background;- on a simulator that is not booted, it boots it and runs
open -a Simulator; - if the script crashes before
close, the claim stays held while the daemon lives.
takeoverneeds a remote lease, so it does not apply to a local simulator.
Proposal (any one is enough)
agent-device exec --platform ios --udid U -- <command...>: take atransient-exclusiveclaim, run the child, and release the claim when the child exits. The claim owner is the exec process, so a crash of the child or of agent-device frees the claim.agent-device device claim --udid Uanddevice release --udid U --session S: take a claim whose owner is the calling process (or one with a TTL or heartbeat). No daemon, no boot, no runner prewarm, no session record.open --claim-only: the currentopenwith no app, but without the boot,open -a Simulatorand runner prewarm.
Option 1 fits our use best. The claim lasts exactly as long as the mutation, and nothing leaks.
Current workaround
We read the claim file right before each simctl call. That narrows the window but does not close it.
Related: #2161 (workspace-scoped device pinning).
- Lingua principale
- TypeScript
- Stelle
- 4.9k
- Fork
- 328
- Merge medio
- 11h 51m
- PR unite (30g)
- 535
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di callstack/agent-device
-
settings clear-app-state fails with ENOENT … scandir '(null)' for iOS system apps such as SettingsAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
callstack/agent-device#3305 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
callstack/agent-device#3296 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
callstack/agent-device#1869 ·
I maintainer di solito rispondono entro 1 giorno
-
needs-triage refactor
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
callstack/agent-device#3311 ·
I maintainer di solito rispondono entro 1 giorno
-
refactor(provider-webdriver): ship AWS Device Farm as the `@agent-device/aws-device-farm` pluginApertaneeds-triage refactor
Difficoltà 4/5 3-5 giorni Idoneità per principianti 54/100
callstack/agent-device#3310 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di callstack/agent-device
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
farbenmeer/tapi#531 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
naver/egjs-flicking#971 ·
-
Renderer treats a sub-pixel width difference as a resize, which cancels the `motion()` entranceAperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
Tenant
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
MTES-MCT/Dossier-Facile-Frontend#2061 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
backnotprop/plannotator#1784 ·
I maintainer di solito rispondono entro 1 giorno