Skip to content

fix(build): bound bicep download with a timeout in the PowerShell installer - #12852

Merged
sk593 merged 2 commits into
mainfrom
sk593/fix-pwsh-bicep-timeout
Sep 29, 2026
Merged

sk593 merged 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

@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 Resolved
@github-actions

github-actions Bot commented Aug 27, 2026 •

Copy link
Copy Markdown

Unit Tests

    2 files  ±0    459 suites  ±0   9m 34s ⏱️ + 1m 30s
6 635 tests ±0  6 633 ✅ ±0  2 💤 ±0  0 ❌ ±0 
7 943 runs  ±0  7 941 ✅ ±0  2 💤 ±0  0 ❌ ±0 

Results for commit 4aa032f. ± Comparison against base commit b25d99b.

♻️ 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.52%. Comparing base (b25d99b) to head (4aa032f).
⚠️ Report is 8 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #12852      +/-   ##
==========================================
- Coverage   59.53%   59.52%   -0.01%     
==========================================
  Files         772      772              
  Lines       45060    45060              
==========================================
- Hits        26825    26824       -1     
- Misses      18235    18236       +1     

☔ 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.

@willdavsmith willdavsmith added the pr:standard Ongoing maintenance, minor improvements, documentation updates, and routine development work label Aug 31, 2026
@github-actions github-actions Bot added the pr:waiting-for-review A reviewer owns the next action; required approval is pending or unverifiable label Sep 24, 2026
`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 force-pushed the sk593/fix-pwsh-bicep-timeout branch from b53a028 to fbbc4a1 Compare September 24, 2026 20:36
@sk593 sk593 changed the title Bound bicep download with a timeout in the PowerShell installer fix(build): bound bicep download with a timeout in the PowerShell installer Sep 24, 2026
Wrap Start-Process in try/catch so a failure to launch the download does not
abort the installer, clear BICEP for the child process so the download cannot
clobber a user-managed bicep, and delete the partial ~/.rad/bin/bicep(.exe) on
timeout or non-zero exit so rad does not treat a corrupt file as installed.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: sk593 <shruthikumar@microsoft.com>
@radius-functional-tests

radius-functional-tests Bot commented Sep 24, 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 4aa032f
Unique ID funcaa3ef2a4d5
Image tag pr-funcaa3ef2a4d5
  • 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-funcaa3ef2a4d5
  • 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-funcaa3ef2a4d5
  • dynamic-rp test image location: ghcr.io/radius-project/dev/dynamic-rp:pr-funcaa3ef2a4d5
  • controller test image location: ghcr.io/radius-project/dev/controller:pr-funcaa3ef2a4d5
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-funcaa3ef2a4d5
  • 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 corerp-cloud functional tests...
⌛ Starting ucp-cloud functional tests...
✅ ucp-cloud functional tests succeeded
✅ corerp-cloud functional tests succeeded

pull Bot pushed a commit to TheTechOddBug/radius that referenced this pull request Sep 25, 2026
<!--
Thank you for contributing to Radius! Please fill out each section below
so
reviewers have the context they need. Sections marked optional can be
removed
if they do not apply.
-->

## Summary

<!-- Provide a concise description of what this PR does. -->

Correct approval lifecycle labels when GitHub returns a null
`reviewDecision` on a ruleset-protected branch. Infer approval only from
current-head reviews that satisfy the effective review count and shared
CODEOWNER team attribution. Required checks still gate
`pr:ready-for-queue` for BEHIND branches.

## Reason for change

<!--
Explain why this change is needed. If it addresses a GitHub issue, link
it
below so it is automatically closed when this PR merges (optional).
-->

Before a later head update dismissed its approval, radius-project#12852 had an
approved CODEOWNER review but retained `pr:waiting-for-review`: GraphQL
reported `reviewDecision: null` despite the effective ruleset requiring
one approval from either listed CODEOWNER team. The fallback remains
conservative for stale approvals, outstanding changes requests,
unverified ownership, and unsupported required-team policies.

<!-- issue number (optional) -->

Related: radius-project#12852

## How to test

<!-- Describe the steps a reviewer can take to verify these changes. -->

- `node --check .github/scripts/pr-status-labels.mjs` — passed.
- `pnpm exec prettier --check --trailing-comma none
.github/scripts/pr-status-labels.mjs` — passed.
- 28 focused inline classifier cases passed for multiple reviewers,
change requests, drafts, CODEOWNER mismatches, and BEHIND required-check
gating. Read-only live API dry runs verified radius-project#12907 receives the
approval handoff without queue readiness while required checks are
outstanding; after radius-project#12852's later approval dismissal, it correctly
remains waiting.

## File change summary

<!-- Summarize the change made in each file that was modified. -->

| File | Summary of change |
| ---- | ----------------- |
| `.github/scripts/pr-status-labels.mjs` | Infer a null review decision
from current ruleset requirements, current-head reviews, and shared
CODEOWNER teams while preserving existing handoff and queue gates. |

---------

Signed-off-by: Dariusz Porowski <3431813+DariuszPorowski@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
@kachawla

Copy link
Copy Markdown
Member

@sk593 are you planning to pick this back up or should this PR be closed?

@sk593

sk593 commented Sep 29, 2026

Copy link
Copy Markdown
Contributor Author

@sk593 are you planning to pick this back up or should this PR be closed?

It's ready to be merged, just needs another approval. Will rerequest a review

@github-actions github-actions Bot added pr:ready-for-queue Review, checks and mergeability permit adding this PR to the queue pr:review-approved Required reviews are approved; checks may still be pending and removed pr:waiting-for-review A reviewer owns the next action; required approval is pending or unverifiable pr:ready-for-queue Review, checks and mergeability permit adding this PR to the queue labels Sep 29, 2026
@sk593
sk593 added this pull request to the merge queue Sep 29, 2026
Merged via the queue into main with commit 78a3413 Sep 29, 2026
87 checks passed
@sk593
sk593 deleted the sk593/fix-pwsh-bicep-timeout branch September 29, 2026 17:45
@github-actions github-actions Bot removed the pr:review-approved Required reviews are approved; checks may still be pending label Sep 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr:standard Ongoing maintenance, minor improvements, documentation updates, and routine development work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants