Repository navigation
fix(build): bound bicep download with a timeout in the PowerShell installer - #12852
Conversation
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.
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
`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>
b53a028 to
fbbc4a1
Compare
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 test overviewClick here to see the test run details
Test Status⌛ Building Radius and pushing container images for functional tests... |
<!-- 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>
|
@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 |
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.