Repository navigation
fix(server): archiving or deleting a thread releases its devices - #34175
binjamshid wants to merge 1 commit into
Conversation
Archiving or deleting a thread, or deleting its project, left the thread's device sessions claimed, so another thread opening the same simulator or emulator got DEVICE_IN_USE. The per-thread teardown effect that archive and delete already queue now also releases each of the thread's device sessions the way device_close does, leaving the devices booted. Fixes pingdotgg#34165.
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — Archiving or deleting a thread now releases its device claims alongside terminal cleanup. Release is scoped to that thread and leaves devices running for other threads. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Problem
Archiving a thread, deleting it, or deleting its project left the thread's device sessions claimed. Another thread that opened the same simulator or emulator got
DEVICE_IN_USE, and after a delete no thread was left that could calldevice_close. #32524 covers settling; this covers archive and delete, which were asked to be tracked separately.Change
Archive and delete already queue the per-thread
terminal.cleanupeffect after the command commits (Orchestrator.tsarchive,ThreadDeletion.ts; project delete goes through thread delete). That effect now also releases each of the thread's device sessions throughDeviceService.close, the same releasedevice_closedoes. Devices stay booted.ResourceCleanupService.cleanupDevicescloses sessions one at a time and tries every one, so an unreachable host does not keep other hosts' claims. Any failure is returned so the effect worker retries.Scope and approval
Bug fix for #34165, the archive/delete part of #17470 that #32524 leaves unchanged.
Verification
runtimeLayer.test.ts: all three failed on main with the session still held, and pass with the fix.vp run check:changed origin/main: format, lint, knip, graphql, typecheck (3 packages) and 195 tests in 5 files pass.Fixes #34165