ci(desktop) [DO NOT MERGE]: try preMake sync hook to dodge hdiutil race#730
ci(desktop) [DO NOT MERGE]: try preMake sync hook to dodge hdiutil race#730softmarshmallow wants to merge 1 commit into
Conversation
Two prior runs (macos-15 #76977463044, macos-26 #76981259137) both failed identically at the DMG maker step: hdiutil: convert failed - Resource temporarily unavailable Upstream investigation: this is a known appdmg + GitHub-Actions-macOS race that electron-forge has not fixed (electron-builder fixed it in June 2025 by switching to dmgbuild; we're on forge). One documented workaround (CMake Discourse) is to flush pending I/O with `sync` before hdiutil so the convert step doesn't race with the package step's writes. Add a darwin-only preMake hook that runs `sync` and sleeps 2s before makers start. Speculative — if it doesn't help, fallback is to drop MakerDMG entirely. Also bump desktop/package.json version to 0.0.2-dmg-test.1 so this test run lands on a clearly-test prerelease tag separate from the 0.0.1 production releases. Will be reset before final merge.
|
The latest updates on your projects. Learn more about Vercel for GitHub. 7 Skipped Deployments
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
WalkthroughElectron Forge configuration in the desktop app now includes a ChangesmacOS DMG Build Race Condition Mitigation
🎯 2 (Simple) | ⏱️ ~8 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint skipped: no ESLint configuration detected in root package.json. To enable, add Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Hypothesis disproven — the sync hook mitigated EAGAIN but exposed appdmg's parallel-arch "Target already exists" race (electron/forge#3517). Going with arm64-only on macOS instead — see #731. |
Two distinct failure modes when building --arch="x64,arm64" together, both surface only with multi-arch parallel builds: 1. `hdiutil convert failed - Resource temporarily unavailable` (EAGAIN from contention on the runner's filesystem) 2. `Target already exists` from appdmg (known unfixed forge bug — electron/forge#3517: maker-dmg fails when run in parallel) The sync hook from PR gridaco#730 mitigated #1 but exposed #2. With one arch there is no parallel race, so both go away. DMG stays. Tradeoff: Intel Mac users can't install or autoupdate. Apple Silicon share dominates in 2026, so the cost is small for a 0.x.x technical preview. We can add Intel back later (universal binary or serialized arch builds) when there's actual demand. Also bump desktop/package.json version to 0.0.2-arm64-test.1 for the CI verification run so this test prerelease lands on its own tag and doesn't touch 0.0.1 production releases. Will be reset before final merge.
This PR is for CI verification only — do NOT merge.
Purpose
PRs #729 (runner bump macos-15 → macos-26) didn't fix the deterministic
hdiutil convert failed - Resource temporarily unavailableerror. This PR layers a speculativepreMakesync hook on top to see if flushing pending I/O before the DMG maker dodges the race.What's here
Two commits on top of
main:e78d187a6—macos-15 → macos-26(already in #729)243c04a30— new:preMakesync hook indesktop/forge.config.ts, plus bumpingdesktop/package.jsonto0.0.2-dmg-test.1so this run lands on a clearly-test prerelease tag separate from0.0.1production.Verification path
Trigger the workflow on this branch with
prerelease=true:update.electronjs.orgskips prereleases by default, so no installed user gets this build. Approve in thereleaseenvironment gate. If the macOS job completes through to publish, the hook works and we cherry-pick the sync hook (without the version bump) into a clean PR. If it fails again, we close this and fall back to droppingMakerDMG.Cleanup
Regardless of outcome, after the test run:
0.0.2-dmg-test.1release + tag on GitHub.Summary by CodeRabbit
Bug Fixes
Chores