Skip to content

fix(aztec-up): fall back to no timeout when /usr/bin/timeout absent (macOS)#23310

Merged
nchamo merged 4 commits into
merge-train/fairiesfrom
nchamo/fix-aztec-up-timeout-macos
May 15, 2026
Merged

fix(aztec-up): fall back to no timeout when /usr/bin/timeout absent (macOS)#23310
nchamo merged 4 commits into
merge-train/fairiesfrom
nchamo/fix-aztec-up-timeout-macos

Conversation

@nchamo
Copy link
Copy Markdown
Contributor

@nchamo nchamo commented May 15, 2026

Problem

The aztec-up installer wraps foundryup in a timeout shell function. The previous implementation only worked on Linux: it gated the call on CI=true and invoked /usr/bin/timeout directly. /usr/bin/timeout ships with GNU coreutils and is absent on stock macOS, so on a macOS GitHub Actions runner (CI=true is auto-set) the installer aborted in install_foundry with:

bash: line 59: /usr/bin/timeout: No such file or directory

Fix

Rework the timeout function so it picks a working backend at runtime. The CI gate is preserved — non-CI runs continue to execute unguarded, matching prior behavior:

  • Prefer /usr/bin/timeout when present (Linux via coreutils).
  • Fall back to perl -e 'alarm ...; exec ...' when /usr/bin/timeout is missing. Perl ships preinstalled on macOS and GitHub's Ubuntu runners, so the guard remains effective there.
  • If neither backend is available, run the command unguarded rather than fail the install — the timeout exists to bound a `foundryup` hang in CI, not to gate the install itself.

Verified the three branches in containers (coreutils path, perl path, neither): timeouts fire at the expected duration, exit codes propagate, and the unguarded branch passes through completion.

@nchamo nchamo requested a review from charlielye as a code owner May 15, 2026 11:43
@nchamo nchamo self-assigned this May 15, 2026
@nchamo nchamo changed the base branch from next to merge-train/fairies May 15, 2026 11:43
@nchamo nchamo force-pushed the nchamo/fix-aztec-up-timeout-macos branch from 4a95f44 to 11e1b78 Compare May 15, 2026 11:44
@nchamo nchamo requested a review from vezenovm May 15, 2026 12:03
Comment thread aztec-up/bin/0.0.1/install Outdated
@nchamo nchamo enabled auto-merge (squash) May 15, 2026 14:59
@nchamo nchamo merged commit 288cba7 into merge-train/fairies May 15, 2026
17 checks passed
@nchamo nchamo deleted the nchamo/fix-aztec-up-timeout-macos branch May 15, 2026 15:13
rangozd pushed a commit to rangozd/aztec-packages that referenced this pull request May 16, 2026
BEGIN_COMMIT_OVERRIDE
fix(aztec-up): fall back to no timeout when /usr/bin/timeout absent
(macOS) (AztecProtocol#23310)
chore: reduce compat e2e timeout (AztecProtocol#23318)
feat(aztec-nr): V2 handshake registry for non interactive constrained
delivery (AztecProtocol#23278)
chore(aztec-nr): Public internal/utility methods self constructor
(AztecProtocol#23115)
END_COMMIT_OVERRIDE
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