Skip to content

fix(ci): make the darwin DMG edge leak-proof (RIG-3335) - #1074

Merged
trunk-io[bot] merged 1 commit into
mainfrom
compass-native/rig-3335-hdiutil-leak
Sep 11, 2026
Merged

fix(ci): make the darwin DMG edge leak-proof (RIG-3335)#1074
trunk-io[bot] merged 1 commit into
mainfrom
compass-native/rig-3335-hdiutil-leak

Conversation

@rigel-mintaka

Copy link
Copy Markdown
Contributor

The darwin lane intermittently failed at hdiutil create with "Resource
busy", taking the rollup red on unrelated PRs and ejecting an approved fix
from the merge queue.

A stale attachment left by an earlier job on a reused runner makes the
create's source busy. The mount was released on the happy path only, so an
abort between attach and verify skipped the detach and leaked the device
along with its diskimages-help process.

Release the mount from an EXIT trap so any exit path detaches, and
force-detach a prior run's Compass attachment before attaching. The bundle
tool does the same before create, via a pure plist parser that selects only
our own image path or volume so an unrelated volume is never touched.

No retry: a retry would hide the leak, and the leak is the bug.

Co-authored-by: Matt Wilkinson matt@rigel.build

The darwin lane intermittently failed at `hdiutil create` with "Resource
busy", taking the rollup red on unrelated PRs and ejecting an approved fix
from the merge queue.

A stale attachment left by an earlier job on a reused runner makes the
create's source busy. The mount was released on the happy path only, so an
abort between attach and verify skipped the detach and leaked the device
along with its diskimages-help process.

Release the mount from an EXIT trap so any exit path detaches, and
force-detach a prior run's Compass attachment before attaching. The bundle
tool does the same before create, via a pure plist parser that selects only
our own image path or volume so an unrelated volume is never touched.

No retry: a retry would hide the leak, and the leak is the bug.

Co-authored-by: Matt Wilkinson <matt@rigel.build>
@linear-code

linear-code Bot commented Sep 11, 2026

Copy link
Copy Markdown

RIG-3335

@trunk-io

trunk-io Bot commented Sep 11, 2026

Copy link
Copy Markdown

😎 Merged successfully - details.

@rigel-mintaka
rigel-mintaka marked this pull request as ready for review September 11, 2026 15:27
@github-actions

Copy link
Copy Markdown

Compass engineering docs preview: https://compass-native-rig-3335-hdiu.compass-eng-docs.pages.dev

Deployed from compass-native/rig-3335-hdiutil-leak at 371345d.

@trunk-io
trunk-io Bot merged commit 8d26d72 into main Sep 11, 2026
15 checks passed
@trunk-io
trunk-io Bot deleted the compass-native/rig-3335-hdiutil-leak branch September 11, 2026 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants