Skip to content

Conversation

@JoshuaBatty
Copy link
Member

The build-channel script was silently skipping targets when network requests failed, resulting in incomplete channel TOML files with missing platform targets. This caused PRs #812, #813, #814 to have broken channel configurations with randomly missing targets.

Root Cause

The write_document function was handling network errors like this:

Err(e) => {
    eprintln!("Error adding url and hash for target '{}':\n{}", target, e);
}

This silently continued without the target, producing incomplete TOML files.

Changes

  • Add fetch_with_retry() helper with exponential backoff (3 retries, 1s/2s/4s delays)
  • Replace silent error handling with proper error propagation using ?
  • Build now fails if any target cannot be fetched after retries
  • Fix clippy warnings for manual string prefix stripping
  • Add forc-crypto version to PR description in update-channel workflow (was missing, only 4/5 packages were shown)

@cursor
Copy link

cursor bot commented Dec 12, 2025

PR Summary

Adds retrying downloads with strict error propagation in build-channel and includes forc-crypto version in the update-channel PR description.

  • build-channel (Rust):
    • Add fetch_with_retry with exponential backoff and use it for tarball downloads; propagate errors to fail the build instead of skipping targets.
    • Simplify version/tag parsing with strip_prefix for cleaner prefix handling.
  • CI workflow (.github/workflows/update-channel.yml):
    • Extract and include forc-crypto version in PR description/env alongside other packages.

Written by Cursor Bugbot for commit a7f2898. This will update automatically on new commits. Configure here.

@JoshuaBatty JoshuaBatty self-assigned this Dec 12, 2025
The build-channel script was silently skipping targets when network
requests failed, resulting in incomplete channel TOML files with
missing platform targets. This caused PRs #812, #813, #814 to have
broken channel configurations.

Changes:
- Add fetch_with_retry() helper with exponential backoff (3 retries)
- Replace silent error handling with proper error propagation
- Build now fails if any target cannot be fetched after retries
- Fix clippy warnings for manual string prefix stripping
- Add forc-crypto version to PR description in update-channel workflow

This ensures channel builds are atomic - either all targets succeed
or the build fails, preventing incomplete channel files from being
published.
@github-actions
Copy link
Contributor

LCOV of commit a7f2898 during CI #2292

Summary coverage rate:
  lines......: 87.2% (2671 of 3064 lines)
  functions..: 61.7% (407 of 660 functions)
  branches...: 65.2% (283 of 434 branches)

Files changed coverage rate: n/a

@JoshuaBatty JoshuaBatty enabled auto-merge (squash) December 12, 2025 01:54
@JoshuaBatty JoshuaBatty merged commit 61a989f into master Dec 12, 2025
24 checks passed
@JoshuaBatty JoshuaBatty deleted the josh-build-channel branch December 12, 2025 02:05
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