Bound bicep download with a timeout in the PowerShell installer - #12852
Bound bicep download with a timeout in the PowerShell installer#12852sk593 wants to merge 2 commits into
Conversation
`rad bicep download` streams a large (~110MB) binary with no client-side timeout, so a stalled network transfer hangs install.ps1 indefinitely. This surfaces as the Validate PowerShell Installer CI job burning its full 10-minute budget at "Installing bicep..." and being cancelled. bicep is optional (its failure is already non-fatal), so run `rad bicep download` as a child process bounded by a 300s timeout: on timeout, stop the process, warn, and continue rather than hanging. This is a script-level mitigation. The underlying missing HTTP timeout in the rad CLI's bicep download (pkg/cli/bicep/tools/download_tools.go) is tracked separately. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Signed-off-by: sk593 <shruthikumar@microsoft.com>
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
There was a problem hiding this comment.
Pull request overview
Mitigates installer hangs in deploy/install.ps1 by bounding rad bicep download with a client-side timeout so stalled transfers don’t block the PowerShell installer indefinitely. This aligns with Radius’s install workflow where bicep is optional and should not prevent rad installation from completing.
Changes:
- Run
rad bicep downloadas a child process viaStart-Processand wait up to 300 seconds. - On timeout, stop the bicep download process and warn while continuing the install flow.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| $bicepTimeoutSeconds = 300 | ||
| $bicepProcess = Start-Process -FilePath $cliFilePath -ArgumentList 'bicep', 'download' -NoNewWindow -PassThru | ||
| $bicepProcess | Wait-Process -Timeout $bicepTimeoutSeconds -ErrorAction SilentlyContinue | ||
| if (-not $bicepProcess.HasExited) { | ||
| $bicepProcess | Stop-Process -Force -ErrorAction SilentlyContinue |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #12852 +/- ##
==========================================
- Coverage 59.81% 59.81% -0.01%
==========================================
Files 776 776
Lines 46042 46042
==========================================
- Hits 27541 27539 -2
- Misses 18501 18503 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Radius functional test overviewClick here to see the test run details
Test Status⌛ Building Radius and pushing container images for functional tests... |
Description
rad bicep download(invoked bydeploy/install.ps1) streams a large (~110MB) binary with no client-side timeout, so a stalled network transfer hangs the installer indefinitely. This surfaced during #12836 as the Validate PowerShell Installer CI job burning its full 10-minute budget atInstalling bicep...and being cancelled, with no application error in the logs.Since bicep is optional (its failure is already non-fatal in the installer), this bounds the download:
rad bicep downloadnow runs as a child process with a 300s timeout. On timeout the process is stopped and the installer warns and continues instead of hanging.This is a script-level mitigation. The underlying root cause — the missing HTTP timeout in the rad CLI's shared bicep download code (
pkg/cli/bicep/tools/download_tools.gouseshttp.Get+io.Copywith no deadline) — is tracked in #12851.Type of change
This pull request fixes a bug in Radius and has an approved issue (#12851).
Notes
pwsh(parse check + simulated hang).Validate PowerShell Installerjob.