Skip to content

fix(docs-examples): retry yarn add and surface errors on final attempt#23538

Merged
PhilWindle merged 1 commit into
nextfrom
cb/20d80471736e
May 24, 2026
Merged

fix(docs-examples): retry yarn add and surface errors on final attempt#23538
PhilWindle merged 1 commit into
nextfrom
cb/20d80471736e

Conversation

@AztecBot
Copy link
Copy Markdown
Collaborator

Summary

PR #23344 (merge-train/spartan) was dequeued from the merge queue on the x8-full grind with docs/examples/bootstrap.sh execute exiting rc=1 and no diagnostic in the log (ci.aztec-labs.com/480b0d23d93a3e87):

09:57:13 Setting up aztecjs_advanced...
09:57:49 + rc=1
09:57:49 + exit 1

setup_project() in docs/examples/ts/aztecjs_runner/run.sh runs each yarn add with > /dev/null 2>&1. Under set -euo pipefail, a transient yarn add failure (link or registry flake) silently exits the runner with no output. aztecjs_advanced is the largest link install in the suite (6 @aztec/* packages), so it's the one that catches a bad day.

Change

Add a small yarn_add_with_retry helper:

  • Retries yarn add up to 3 times, sleeping 5s between attempts.
  • Stays silent on success and on early retries (preserves current "happy path" log volume).
  • Unsilences stderr on the final attempt so the next flake surfaces in CI logs and is debuggable.

All three yarn add call sites in setup_project are routed through it (link deps, npm deps, and typescript/tsx).

Test plan

  • Local sandbox: docs/examples/ts/aztecjs_runner/run.sh advanced succeeds end-to-end.
  • CI: docs/examples/bootstrap.sh execute passes on a clean grind; on a flake, the failure shows yarn add output instead of an empty rc=1.

Created by claudebox · group: slackbot

setup_project in docs/examples/ts/aztecjs_runner/run.sh ran each
`yarn add` with `> /dev/null 2>&1`. Under `set -euo pipefail` a
transient yarn-add failure silently aborted the runner with rc=1 and
no diagnostic output, which dequeued PR #23344 from the merge queue
when aztecjs_advanced's link install flaked.

Wrap yarn add in a small retry helper that keeps the existing silent
behaviour on success but unsilences stderr on the final attempt so
the next flake leaves a usable trace in CI logs.
@AztecBot AztecBot added ci-no-squash claudebox Owned by claudebox. it can push to this PR. labels May 24, 2026
@PhilWindle PhilWindle marked this pull request as ready for review May 24, 2026 11:05
@PhilWindle PhilWindle requested a review from a team as a code owner May 24, 2026 11:05
@PhilWindle PhilWindle enabled auto-merge May 24, 2026 11:05
@PhilWindle PhilWindle added this pull request to the merge queue May 24, 2026
Merged via the queue into next with commit 24556f0 May 24, 2026
67 of 69 checks passed
@PhilWindle PhilWindle deleted the cb/20d80471736e branch May 24, 2026 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-no-squash claudebox Owned by claudebox. it can push to this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants