Skip to content

rad bicep download has no HTTP timeout and can hang indefinitely #12851

Open

Description

@sk593

Steps to reproduce

  1. Run rad bicep download (invoked automatically by deploy/install.ps1 and deploy/install.sh) in an environment where the network stalls mid-transfer while fetching the ~110MB bicep binary.
  2. The command blocks forever with no progress and no error.

This was surfaced during PR #12836 (the install.sh sudo fix): the Validate PowerShell Installer CI job repeatedly stalled at Installing bicep... and consumed its full 10-minute budget before being cancelled, with no application error in the logs.

Observed behavior

pkg/cli/bicep/tools/download_tools.go DownloadToFolder uses http.Get (the default client, which has no Timeout) followed by io.Copy on resp.Body (no read deadline). If the connection stalls after the response headers arrive, the copy blocks indefinitely.

The retry loop in pkg/cli/bicep/bicep.go only fires on returned errors, so a hang never surfaces an error and never triggers a retry — the process just hangs until an external timeout (e.g. the CI job cancellation) kills it.

Desired behavior

DownloadToFolder should use an http.Client with a sensible request timeout and/or a context deadline, so a stalled transfer fails with an error that the existing retry loop can act on, instead of hanging forever. This applies to all platforms since the download code is shared.

Workaround

A script-level mitigation was added in the PowerShell installer (bound rad bicep download with a 300s timeout so a stall warns and continues instead of hanging) in the PR that references this issue. That is only a mitigation; the root cause is the missing timeout in the shared Go download code.

rad Version

Reproduced with the released v0.60.1 rad binary in CI (edge channel).

Operating system

Surfaced on windows-2025 GitHub-hosted runners; the underlying bug is platform-independent (shared download code).

Additional context

Activity

  1. added
    bug
    on Aug 27, 2026
  2. radius-triage commented on Aug 27, 2026

    @radius-triage

    👋 @sk593 Thanks for filing this bug report.

    A project maintainer will review this report and get back to you soon. If you'd like immediate help troubleshooting, please visit our Discord server.

    For more information on our triage process please visit our triage overview

  3. added
    triaged
    on Aug 27, 2026
  4. radius-triage commented on Aug 27, 2026

    @radius-triage

    👍 We've reviewed this issue and have agreed to add it to our backlog. Please subscribe to this issue for notifications, we'll provide updates when we pick it up.

    We also welcome community contributions! If you would like to pick this item up sooner and submit a pull request, please visit our contribution guidelines and assign this to yourself by commenting "/assign" on this issue.

    For more information on our triage process please visit our triage overview

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    buggithub-copilottriaged

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions