This is an automated email from the ASF dual-hosted git repository. github-merge-queue[bot] pushed a commit to branch gh-readonly-queue/main/pr-9381-e5192c16fbb7d45fb6fbc8ce92c862fbf0902d27 in repository https://gitbox.apache.org/repos/asf/texera.git
commit 22645366711c901a7ce5a9a229845700318bc5ee Author: Xinyuan Lin <[email protected]> AuthorDate: Wed Nov 25 09:32:22 2026 +0000 ci: retry tool downloads on transient errors (#9381) ### What changes were proposed in this PR? CI setup steps downloaded protoc, the macOS RustFS and Lakekeeper archives and the bun installer with a bare `curl`, so one transient HTTP error from the download host failed the job before any test ran. On 2026-11-08, #9366's amber-integration and platform-integration jobs died this way on a 504 from GitHub releases. Each of these downloads now passes `--retry 5 --retry-delay 5 --retry-all-errors --connect-timeout 30` to curl: - `--retry 5 --retry-delay 5`: up to five more attempts, 5 s apart. A host that stays down still fails the step, after the sixth attempt. - `--retry-all-errors`: also retries a connection that drops mid-download, which `--retry` alone does not. Every site writes with `-o`, and curl discards a failed attempt's partial file before it retries. - `--connect-timeout 30`: a connect that hangs fails the attempt after 30 s instead of curl's default 300 s. The bun installer was piped into `bash`. The step shell is `bash -e` without `pipefail`, so when the fetch failed, `bash` ran an empty or truncated script, the step passed, and the job failed later at `bun install`. The installer is now saved to `/tmp/bun-install.sh` and then run with the same version argument, so a failed fetch fails this step and a partial script never runs. The installer downloads bun itself from GitHub releases with a plain `curl --fail`, so the step runs it up to six times, 5 s apart, and `bun --version` then fails the step if no attempt installed bun. `--retry-all-errors` needs curl 7.71 or later: ubuntu-latest (ubuntu-26.04) has curl 8.18.0 and macos-latest (macos-26-arm64) has 8.7.1. ### Any related issues, documentation, discussions? Closes #9380. ### How was this PR tested? - CI on this PR: the `ci` label runs every stack and the Bench workflow, so each changed step runs on its runner with the new options (amber-integration on ubuntu and macOS, platform-integration (workflow-compiling-service), pyamber, agent-service on ubuntu and macOS, and Bench). - Locally, curl 8.10.1 against a small HTTP server that fails on purpose. Before is `curl -fsSL -o <file> <url>`; after adds the four retry options. | Server | Before | After | | --- | --- | --- | | 504, 504, then 200 | exit 22 at the first 504 | exit 0 on the third attempt; the file holds the full payload | | 504 on every request | exit 22 | exit 22 after 6 attempts (25 s) | | Connection closes mid-body once | exit 18, also with `--retry` alone | exit 0 on the second attempt; the file holds the full payload | | Bun step under `bash -e`, installer URL always 504 | the step passes without running the installer | the step fails at the download with exit 22 | - The Setup Bun script, extracted from the workflow and run with `bash -e` against a stand-in installer: it installs on the first run, installs on the third run after two failures, and after six failures fails the step at `bun --version` (exit 127). - Both workflow files parse with PyYAML, only the seven changed `run:` scripts differ from `main`, and each passes `bash -n`. ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (Claude Opus 5.5) 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- .github/workflows/benchmarks.yml | 2 +- .github/workflows/build.yml | 18 ++++++++++++------ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index f4711330fd..725379ce67 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -227,7 +227,7 @@ jobs: - name: Install protoc run: | PROTOC_VERSION=$(cat bin/protoc-version.txt) - curl -fsSL -o /tmp/protoc.zip "https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip" + curl -fsSL --retry 5 --retry-delay 5 --retry-all-errors --connect-timeout 30 -o /tmp/protoc.zip "https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip" sudo unzip -o /tmp/protoc.zip -d /usr/local sudo chmod +x /usr/local/bin/protoc sudo chmod -R a+rX /usr/local/include/google diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4421630ffb..e7b2b59df5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -458,7 +458,7 @@ jobs: run: | if [ "$RUNNER_OS" = "Linux" ]; then PROTOC_VERSION=$(cat bin/protoc-version.txt) - curl -fsSL -o /tmp/protoc.zip "https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip" + curl -fsSL --retry 5 --retry-delay 5 --retry-all-errors --connect-timeout 30 -o /tmp/protoc.zip "https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip" sudo unzip -o /tmp/protoc.zip -d /usr/local sudo chmod +x /usr/local/bin/protoc sudo chmod -R a+rX /usr/local/include @@ -526,7 +526,7 @@ jobs: -e RUSTFS_REGION=us-west-2 \ rustfs/rustfs:1.0.0 else - curl -sSfL -o /tmp/rustfs.zip \ + curl -sSfL --retry 5 --retry-delay 5 --retry-all-errors --connect-timeout 30 -o /tmp/rustfs.zip \ https://dl.rustfs.com/artifacts/rustfs/release/rustfs-macos-aarch64-v1.0.0.zip unzip -q -o /tmp/rustfs.zip -d /tmp/rustfs-bin chmod +x /tmp/rustfs-bin/rustfs @@ -570,7 +570,7 @@ jobs: healthcheck() { docker exec lakekeeper /home/nonroot/lakekeeper healthcheck; } on_fail() { echo "Lakekeeper failed to start. Container logs:"; docker logs lakekeeper; } else - curl -fsSL -o /tmp/lakekeeper.tar.gz \ + curl -fsSL --retry 5 --retry-delay 5 --retry-all-errors --connect-timeout 30 -o /tmp/lakekeeper.tar.gz \ "https://github.com/lakekeeper/lakekeeper/releases/download/${LAKEKEEPER_VERSION}/lakekeeper-aarch64-apple-darwin.tar.gz" mkdir -p /tmp/lakekeeper-bin tar -xzf /tmp/lakekeeper.tar.gz -C /tmp/lakekeeper-bin @@ -1020,7 +1020,7 @@ jobs: if: ${{ matrix.service == 'workflow-compiling-service' && inputs.run_workflow_to_python }} run: | PROTOC_VERSION=$(cat bin/protoc-version.txt) - curl -fsSL -o /tmp/protoc.zip "https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip" + curl -fsSL --retry 5 --retry-delay 5 --retry-all-errors --connect-timeout 30 -o /tmp/protoc.zip "https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip" sudo unzip -o /tmp/protoc.zip -d /usr/local sudo chmod +x /usr/local/bin/protoc sudo chmod -R a+rX /usr/local/include/google @@ -1208,7 +1208,7 @@ jobs: # Version pinned in bin/protoc-version.txt. run: | PROTOC_VERSION=$(cat bin/protoc-version.txt) - curl -fsSL -o /tmp/protoc.zip "https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip" + curl -fsSL --retry 5 --retry-delay 5 --retry-all-errors --connect-timeout 30 -o /tmp/protoc.zip "https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip" sudo unzip -o /tmp/protoc.zip -d /usr/local sudo chmod +x /usr/local/bin/protoc sudo chmod -R a+rX /usr/local/include/google @@ -1279,7 +1279,13 @@ jobs: run: bash ./.github/scripts/prepare-backport-checkout.sh "${{ inputs.backport_target_branch }}" "${{ inputs.backport_commit_range }}" - name: Setup Bun run: | - curl -fsSL https://bun.sh/install | bash -s -- bun-v${{ matrix.bun-version }} + curl -fsSL --retry 5 --retry-delay 5 --retry-all-errors --connect-timeout 30 -o /tmp/bun-install.sh https://bun.sh/install + for i in $(seq 1 6); do + bash /tmp/bun-install.sh bun-v${{ matrix.bun-version }} && break + echo "Bun install failed (attempt $i)" + sleep 5 + done + "$HOME/.bun/bin/bun" --version echo "$HOME/.bun/bin" >> $GITHUB_PATH - name: Install production dependencies run: bun install --production --frozen-lockfile
