Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ jobs:
run: |
set -euo pipefail
# Pinned Trunk release, checksum-verified, as web-deploy.yml installs it.
curl -sSfL -o "$RUNNER_TEMP/trunk.tar.gz" https://github.com/trunk-rs/trunk/releases/download/v0.21.14/trunk-x86_64-unknown-linux-gnu.tar.gz
curl -sSfL --retry 5 --retry-all-errors -o "$RUNNER_TEMP/trunk.tar.gz" https://github.com/trunk-rs/trunk/releases/download/v0.21.14/trunk-x86_64-unknown-linux-gnu.tar.gz

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The retry is right for the 618 case, but nothing bounds a stalled download. Without a connect or transfer timeout, one hung connection still holds the job until the runner's own timeout, and the retries never run. nightly.yml (line 97) already bounds its downloads with --connect-timeout and --max-time. A connect timeout is a small, safe addition here; a transfer cap needs a size check first, since the tarball is not small.

Suggested change
curl -sSfL --retry 5 --retry-all-errors -o "$RUNNER_TEMP/trunk.tar.gz" https://github.com/trunk-rs/trunk/releases/download/v0.21.14/trunk-x86_64-unknown-linux-gnu.tar.gz
curl -sSfL --retry 5 --retry-all-errors --connect-timeout 30 -o "$RUNNER_TEMP/trunk.tar.gz" https://github.com/trunk-rs/trunk/releases/download/v0.21.14/trunk-x86_64-unknown-linux-gnu.tar.gz

Confidence: medium. I did not check how long a stalled transfer lasts on the hosted runners.

Category: quality

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left for the release quality pass: the failures seen so far were all immediate 618 responses, not stalls.

echo "f2b4680cd239693a646a2795e4633c625328d7b2a044fbe749fa3a2fe9e7036b $RUNNER_TEMP/trunk.tar.gz" | sha256sum -c -
mkdir -p "$RUNNER_TEMP/bin" && tar xzf "$RUNNER_TEMP/trunk.tar.gz" -C "$RUNNER_TEMP/bin" trunk
# The page names the release profile (`web`, fat LTO: a quarter of an hour), which would
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
- name: Build the web app
run: |
# Pinned Trunk release, checksum-verified, installed outside root-owned directories.
curl -sSfL -o "$RUNNER_TEMP/trunk.tar.gz" https://github.com/trunk-rs/trunk/releases/download/v0.21.14/trunk-x86_64-unknown-linux-gnu.tar.gz
curl -sSfL --retry 5 --retry-all-errors -o "$RUNNER_TEMP/trunk.tar.gz" https://github.com/trunk-rs/trunk/releases/download/v0.21.14/trunk-x86_64-unknown-linux-gnu.tar.gz
echo "f2b4680cd239693a646a2795e4633c625328d7b2a044fbe749fa3a2fe9e7036b $RUNNER_TEMP/trunk.tar.gz" | sha256sum -c -
mkdir -p "$RUNNER_TEMP/bin" && tar xzf "$RUNNER_TEMP/trunk.tar.gz" -C "$RUNNER_TEMP/bin" trunk
export PATH="$RUNNER_TEMP/bin:$PATH"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ jobs:
- name: Install Trunk
run: |
set -euo pipefail
curl -sSfL -o "$RUNNER_TEMP/trunk.tar.gz" https://github.com/trunk-rs/trunk/releases/download/v0.21.14/trunk-x86_64-unknown-linux-gnu.tar.gz
curl -sSfL --retry 5 --retry-all-errors -o "$RUNNER_TEMP/trunk.tar.gz" https://github.com/trunk-rs/trunk/releases/download/v0.21.14/trunk-x86_64-unknown-linux-gnu.tar.gz
echo "f2b4680cd239693a646a2795e4633c625328d7b2a044fbe749fa3a2fe9e7036b $RUNNER_TEMP/trunk.tar.gz" | sha256sum -c -
mkdir -p "$RUNNER_TEMP/bin"
tar xzf "$RUNNER_TEMP/trunk.tar.gz" -C "$RUNNER_TEMP/bin" trunk
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/web-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
run: |
set -euo pipefail
# Pinned Trunk release, checksum-verified, installed outside root-owned directories.
curl -sSfL -o "$RUNNER_TEMP/trunk.tar.gz" https://github.com/trunk-rs/trunk/releases/download/v0.21.14/trunk-x86_64-unknown-linux-gnu.tar.gz
curl -sSfL --retry 5 --retry-all-errors -o "$RUNNER_TEMP/trunk.tar.gz" https://github.com/trunk-rs/trunk/releases/download/v0.21.14/trunk-x86_64-unknown-linux-gnu.tar.gz
echo "f2b4680cd239693a646a2795e4633c625328d7b2a044fbe749fa3a2fe9e7036b $RUNNER_TEMP/trunk.tar.gz" | sha256sum -c -
mkdir -p "$RUNNER_TEMP/bin" && tar xzf "$RUNNER_TEMP/trunk.tar.gz" -C "$RUNNER_TEMP/bin" trunk
export PATH="$RUNNER_TEMP/bin:$PATH"
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ RUN case "$BUILDARCH" in \
arm64) arch=aarch64; sum=b1d8e60e454f7fc182d9a4d95d1506ffbae947d8ba90f8f6f02da93b60f980f9 ;; \
*) echo "no Trunk release for BUILDARCH='$BUILDARCH' (BuildKit sets it)" >&2; exit 1 ;; \
esac \
&& curl -sSfL -o /tmp/trunk.tar.gz "https://github.com/trunk-rs/trunk/releases/download/v0.21.14/trunk-${arch}-unknown-linux-gnu.tar.gz" \
&& curl -sSfL --retry 5 --retry-all-errors -o /tmp/trunk.tar.gz "https://github.com/trunk-rs/trunk/releases/download/v0.21.14/trunk-${arch}-unknown-linux-gnu.tar.gz" \
&& echo "${sum} /tmp/trunk.tar.gz" > /tmp/trunk.sha256 \
&& sha256sum -c /tmp/trunk.sha256 \
&& tar xzf /tmp/trunk.tar.gz -C /usr/local/bin trunk \
Expand Down
Loading