rad bicep download has no HTTP timeout and can hang indefinitely
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 74/100
Research direction
Start with DownloadToFolder in pkg/cli/bicep/tools/download_tools.go, then read the retry loop in pkg/cli/bicep/bicep.go. Run rad bicep download in a stalled-network scenario and verify that the download returns an error, allowing the existing retries to run instead of hanging indefinitely.
Written by the indexing model from the issue text.
Description
Steps to reproduce
- Run
rad bicep download(invoked automatically bydeploy/install.ps1anddeploy/install.sh) in an environment where the network stalls mid-transfer while fetching the ~110MB bicep binary. - 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
- Root cause:
pkg/cli/bicep/tools/download_tools.go(http.Getat theDownloadToFolderGET,io.Copyon the response body). - Retry loop that cannot recover from a hang:
pkg/cli/bicep/bicep.go. - Surfaced by: #12836.
- Dominant language
- Go
- Stars
- 1.7k
- Forks
- 137
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 81
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from radius-project/radius
-
flaky-test triaged
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
radius-project/radius#12661 · 1 comment ·
-
bug triaged
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
radius-project/radius#12588 · 2 comments ·
-
bug triaged
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
radius-project/radius#12587 · 2 comments ·
-
bug triaged
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
radius-project/radius#12568 · 2 comments ·
-
bug triaged
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
radius-project/radius#12418 · 2 comments ·
All issues in radius-project/radius
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 84/100
-
enhancement needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
kind/cleanup
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
kubernetes-sigs/kueue#15947 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
sympozium-ai/sympozium#627 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100