Skip to content

Bound bicep download with a timeout in the PowerShell installer - #12852

Open
sk593 wants to merge 2 commits into
mainfrom
sk593/fix-pwsh-bicep-timeout
Open

Bound bicep download with a timeout in the PowerShell installer#12852
sk593 wants to merge 2 commits into
mainfrom
sk593/fix-pwsh-bicep-timeout

Conversation

@sk593

@sk593 sk593 commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Description

rad bicep download (invoked by deploy/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 at Installing 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 download now 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.go uses http.Get + io.Copy with no deadline) — is tracked in #12851.

Type of change

This pull request fixes a bug in Radius and has an approved issue (#12851).

Notes

`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>
@sk593
sk593 requested review from a team as code owners August 27, 2026 15:38
Copilot AI lite review requested due to automatic review settings August 27, 2026 15:38
@github-actions

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 download as a child process via Start-Process and 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.

Comment thread deploy/install.ps1
Comment on lines +552 to +556
$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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sk593 pls apply this suggestion, thx!

@github-actions

github-actions Bot commented Aug 27, 2026

Copy link
Copy Markdown

Unit Tests

    2 files  ±0    459 suites  ±0   8m 25s ⏱️ -14s
6 527 tests ±0  6 525 ✅ ±0  2 💤 ±0  0 ❌ ±0 
7 803 runs  ±0  7 801 ✅ ±0  2 💤 ±0  0 ❌ ±0 

Results for commit d1c5caf. ± Comparison against base commit fa29a3d.

♻️ This comment has been updated with latest results.

@codecov

codecov Bot commented Aug 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.81%. Comparing base (fa29a3d) to head (d1c5caf).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented Aug 27, 2026

Copy link
Copy Markdown

Functional Tests - ucp-cloud

4 tests  ±0   4 ✅ ±0   35s ⏱️ +2s
1 suites ±0   0 💤 ±0 
1 files   ±0   0 ❌ ±0 

Results for commit d1c5caf. ± Comparison against base commit fa29a3d.

♻️ This comment has been updated with latest results.

@radius-functional-tests

radius-functional-tests Bot commented Aug 31, 2026

Copy link
Copy Markdown

Radius functional test overview

🔍 Go to test action run

Click here to see the test run details
Name Value
Repository radius-project/radius
Commit ref d1c5caf
Unique ID funcd26cddeb3c
Image tag pr-funcd26cddeb3c
  • Dapr: 1.14.4
  • Azure KeyVault CSI driver: 1.4.2
  • Azure Workload identity webhook: 1.3.0
  • Bicep recipe location ghcr.io/radius-project/dev/test/testrecipes/test-bicep-recipes/<name>:pr-funcd26cddeb3c
  • Terraform recipe location http://tf-module-server.radius-test-tf-module-server.svc.cluster.local/<name>.zip (in cluster)
  • applications-rp test image location: ghcr.io/radius-project/dev/applications-rp:pr-funcd26cddeb3c
  • dynamic-rp test image location: ghcr.io/radius-project/dev/dynamic-rp:pr-funcd26cddeb3c
  • controller test image location: ghcr.io/radius-project/dev/controller:pr-funcd26cddeb3c
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-funcd26cddeb3c
  • deployment-engine test image location: ghcr.io/radius-project/deployment-engine:latest

Test Status

⌛ Building Radius and pushing container images for functional tests...
✅ Container images build succeeded
⌛ Publishing Bicep Recipes for functional tests...
✅ Recipe publishing succeeded
⌛ Starting ucp-cloud functional tests...
✅ ucp-cloud functional tests succeeded
✅ corerp-cloud functional tests succeeded

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants