Skip to content

Add automatic retry for failed tool downloads #1027

@mondeja

Description

@mondeja

Sometimes the tools fail to download and Trunk displays an error message like

2025-10-14T09:35:51.892671Z  INFO downloading wasm-bindgen version="0.2.104"
2025-10-14T09:35:51.997188Z  INFO installing wasm-bindgen
2025-10-14T09:35:52.792645Z  INFO downloading wasm-opt version="version_123"
2025-10-14T09:35:57.809746Z ERROR ❌ error
error from build pipeline

Caused by:
    0: HTML build pipeline failed (1 errors), showing first
    1: error from asset pipeline
    2: running wasm-opt
    3: failed downloading release archive
    4: error sending HTTP request
    5: error sending request for url (https://github.com/WebAssembly/binaryen/releases/download/version_123/binaryen-version_123-x86_64-linux.tar.gz)
    6: client error (Connect)
    7: dns error: failed to lookup address information: Try again
    8: failed to lookup address information: Try again

Instead of suggesting to "Try Again", Trunk could retry the download by itself. This would lead to more stable pipelines when using Trunk.

So add a retrying strategy to the download function

async fn download(

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions