This is an automated email from the ASF dual-hosted git repository.
CurtHagenlocher pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-dotnet.git
The following commit(s) were added to refs/heads/main by this push:
new 4e1dfd3 fix: Verify release candidates under the physical temporary
path (#505)
4e1dfd3 is described below
commit 4e1dfd3941a6829fa42cd59e59aa28420f562333
Author: Curt Hagenlocher <[email protected]>
AuthorDate: Sun Nov 15 17:08:10 2026 -0800
fix: Verify release candidates under the physical temporary path (#505)
## What's wrong
On macOS, `verify_rc.sh` can fail with dozens of spurious compile errors
in the test step: "type or namespace name 'FlightTicket' could not be
found", `K4os` not found in the compression tests, and so on, even
though the same projects built successfully moments earlier in the build
step.
The cause is the temporary directory. On macOS it's under `/var`, which
is a symlink to `/private/var`, and the script works under the symlinked
path. Tools can then see the same files under both `/var/folders/…` and
`/private/var/folders/…`. When that happens, MSBuild treats each project
as two different projects and builds them concurrently into the same
output folder, so builds read references that another build is still
writing.
## Evidence
From the `Verify (8.0.x, macos-latest)` job of the RC workflow on #504:
| Run | Runner image | Restores under `/var` | Restores under
`/private/var` | Result |
|---|---|---:|---:|---|
| [Failing
run](https://github.com/apache/arrow-dotnet/actions/runs/43776728836/job/133004801520)
| `20261103.629` | 25 | 20 | 127 compile errors |
| [Rerun of the same
commit](https://github.com/apache/arrow-dotnet/actions/runs/43776728836/attempts/2)
| `20261028.624` | 0 | 34 | Passed |
| Earlier runs, and the latest run on `main` | `20261028.624` | 0 | 34 |
Passed |
Every run reports its sandbox under `/var/folders/…`, but only the run
on the newer image ended up with both paths in use. So this is likely to
start failing on `main` too once that image becomes the default for
`macos-latest`.
## The fix
`setup_tmpdir` now resolves `VERIFY_TMPDIR` to its physical path with
`pwd -P` before anything works in it, so the shell's `$PWD` and the
operating system's view of the current directory agree. This applies
both when the script creates the directory with `mktemp` and when the
caller supplies `VERIFY_TMPDIR`. The cleanup trap removes the same
directory either way. On Linux and Windows, where the path normally has
no symlinks, nothing changes.
## Testing
- With a real symlinked directory, both branches of `setup_tmpdir`
(`mktemp` and a caller-supplied `VERIFY_TMPDIR`) resolve to the physical
path, `$PWD` is physical after the `cd`, and the cleanup trap still
removes the directory.
- `shellcheck` 0.10.0 (the version pinned in `.pre-commit-config.yaml`)
and `shfmt` report no issues.
- I couldn't run the script on macOS locally; this PR's own RC workflow
run exercises it on `macos-latest`.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
---
dev/release/verify_rc.sh | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/dev/release/verify_rc.sh b/dev/release/verify_rc.sh
index e2c2294..a470d1b 100755
--- a/dev/release/verify_rc.sh
+++ b/dev/release/verify_rc.sh
@@ -73,6 +73,12 @@ setup_tmpdir() {
else
mkdir -p "${VERIFY_TMPDIR}"
fi
+
+ # Work under the physical path. On macOS the temporary directory is under
/var,
+ # which is a symlink to /private/var. Working under the symlinked path lets
+ # tools see the same files under both paths, and MSBuild then treats each
+ # project as two and builds them concurrently into the same outputs.
+ VERIFY_TMPDIR="$(cd "${VERIFY_TMPDIR}" && pwd -P)"
}
download() {