Disable Spotlight indexing for the macOS build checks

The Intel appbundle build fails at the very last step, every time rather than
intermittently: the bundle is assembled, _verify_bundle_linkage passes, the SBOM
is written, the disk image is created and populated, and then create-dmg cannot
unmount it.

    Unmounting disk image...
    hdiutil: detach: timeout for DiskArbitration expired
    hdiutil: detach: drive not detached

Two runs, identical failure, and the gap between the unmount starting and the
timeout is exactly 120 seconds, so something is waiting out a timeout rather
than racing. Spotlight indexing the freshly mounted volume is the usual cause,
holding a DiskArbitration reservation that the detach then sits behind, and
nothing on a build runner wants a Spotlight index anyway.

arm64 has never shown this, so the step is harmless there rather than needed.
If this doesn't settle it, the next thing to try is macos-26-intel, and after
that a retry around the detach, which would mean changing pkg/mac rather than
the workflow.
This commit is contained in:
Dave Page committed 2026-09-16 12:03:20 +01:00
1 parent 35f3615644
commit 68a5f7781f
1 file changed
+11
+11
View File
@@ -62,6 +62,17 @@ jobs:
- name: Install the build dependencies
run: brew install postgresql@18 openssl@3 syft wget
# create-dmg mounts a disk image and unmounts it again, and on the Intel
# runners that unmount reliably fails: "hdiutil: detach: timeout for
# DiskArbitration expired", exactly 120 seconds after it starts, with the
# bundle otherwise complete. Spotlight indexing the freshly mounted
# volume is the usual culprit, since it holds a DiskArbitration
# reservation the detach then waits out. Nothing on a build runner wants
# a Spotlight index. Harmless on arm64, which has never shown the
# problem.
- name: Disable Spotlight indexing
run: sudo mdutil -a -i off || true
- name: Check the appbundle build
run: |
PGADMIN_POSTGRES_DIR="$(brew --prefix postgresql@18)"