Skip to content

feat(install): add existing warning#11523

Merged
DariuszPorowski merged 4 commits intomainfrom
dp/tame-beaver
Mar 26, 2026
Merged

feat(install): add existing warning#11523
DariuszPorowski merged 4 commits intomainfrom
dp/tame-beaver

Conversation

@DariuszPorowski
Copy link
Copy Markdown
Member

@DariuszPorowski DariuszPorowski commented Mar 26, 2026

Description

Adds highly visible installer warnings when rad is already present on PATH from a different location. The shell installer now scans all PATH entries instead of stopping at the first match, and the PowerShell installer adopts the same behavior so both entry points warn about stale binaries before reinstalling.

image image

Type of change

  • This pull request fixes a bug in Radius and has an approved issue (issue link required).

Fixes: #11518

Contributor checklist

Please verify that the PR meets the following requirements, where applicable:

  • An overview of proposed schema changes is included in a linked GitHub issue.
    • Yes
    • Not applicable
  • A design document PR is created in the design-notes repository, if new APIs are being introduced.
    • Yes
    • Not applicable
  • The design document has been reviewed and approved by Radius maintainers/approvers.
    • Yes
    • Not applicable
  • A PR for the samples repository is created, if existing samples are affected by the changes in this PR.
    • Yes
    • Not applicable
  • A PR for the documentation repository is created, if the changes in this PR affect the documentation or any user facing updates are made.
    • Yes
    • Not applicable
  • A PR for the recipes repository is created, if existing recipes are affected by the changes in this PR.
    • Yes
    • Not applicable

Signed-off-by: Dariusz Porowski <3431813+DariuszPorowski@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 26, 2026 16:11
@DariuszPorowski DariuszPorowski requested review from a team as code owners March 26, 2026 16:11
@DariuszPorowski DariuszPorowski self-assigned this Mar 26, 2026
@DariuszPorowski DariuszPorowski changed the title Installer warnings for existing rad binaries on PATH feat(install): add existing warning Mar 26, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR improves the Radius CLI installers by detecting when rad already exists on PATH from a different directory and emitting a prominent warning so users don’t accidentally keep running a stale binary after reinstalling.

Changes:

  • Add a PATH-wide scan in install.sh to warn about existing rad binaries outside the target install directory.
  • Add equivalent PATH-wide warning behavior in install.ps1 for parity across installer entry points.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.

File Description
deploy/install.sh Adds warnExistingRadiusElsewhere and invokes it before installation to warn about stale rad binaries on PATH.
deploy/install.ps1 Adds Show-ExistingRadiusWarning and invokes it before installation to warn about stale rad binaries on PATH.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Dariusz Porowski <3431813+DariuszPorowski@users.noreply.github.com>
@zachcasper
Copy link
Copy Markdown
Contributor

LGTM. If you could put a new line after Current version: RELEASE VERSION BICEP that would clean up the output.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Dariusz Porowski <3431813+DariuszPorowski@users.noreply.github.com>
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 51.20%. Comparing base (ddd4eeb) to head (d648aa8).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #11523      +/-   ##
==========================================
- Coverage   51.21%   51.20%   -0.02%     
==========================================
  Files         699      699              
  Lines       44050    44050              
==========================================
- Hits        22560    22555       -5     
- Misses      19330    19334       +4     
- Partials     2160     2161       +1     

☔ View full report in Codecov by Sentry.
📢 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
Copy link
Copy Markdown

github-actions bot commented Mar 26, 2026

Unit Tests

    2 files  ±0    415 suites  ±0   6m 55s ⏱️ +36s
4 862 tests ±0  4 860 ✅ ±0  2 💤 ±0  0 ❌ ±0 
5 764 runs  ±0  5 762 ✅ ±0  2 💤 ±0  0 ❌ ±0 

Results for commit 4825f9f. ± Comparison against base commit ddd4eeb.

♻️ This comment has been updated with latest results.

…es and improve output formatting

Signed-off-by: Dariusz Porowski <3431813+DariuszPorowski@users.noreply.github.com>
sk593
sk593 previously approved these changes Mar 26, 2026
nithyatsu
nithyatsu previously approved these changes Mar 26, 2026
@nithyatsu
Copy link
Copy Markdown
Contributor

nithyatsu commented Mar 26, 2026

It might be nicer to prompt the user at remove old binary message with a question and just remove it before proceeding with the installation, instead of relying on the user to do it after we install. Not a blocker, LGTM.

@DariuszPorowski
Copy link
Copy Markdown
Member Author

It might be nicer to prompt the user at remove old binary message with a question and just remove it before proceeding with the installation, instead of relying on the user to do it after we install. Not a blocker, LGTM.

by design install scripts run in unattended mode to use for automation etc

@radius-functional-tests
Copy link
Copy Markdown

radius-functional-tests bot commented Mar 26, 2026

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 4825f9f
Unique ID funccdd9ae8065
Image tag pr-funccdd9ae8065
  • gotestsum 1.13.0
  • KinD: v0.29.0
  • 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-funccdd9ae8065
  • 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-funccdd9ae8065
  • dynamic-rp test image location: ghcr.io/radius-project/dev/dynamic-rp:pr-funccdd9ae8065
  • controller test image location: ghcr.io/radius-project/dev/controller:pr-funccdd9ae8065
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-funccdd9ae8065
  • 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...
⌛ Starting corerp-cloud functional tests...
✅ ucp-cloud functional tests succeeded
✅ corerp-cloud functional tests succeeded

@DariuszPorowski DariuszPorowski requested a review from sk593 March 26, 2026 17:45
@DariuszPorowski DariuszPorowski merged commit 6dba830 into main Mar 26, 2026
103 of 106 checks passed
@DariuszPorowski DariuszPorowski deleted the dp/tame-beaver branch March 26, 2026 18:21
sk593 pushed a commit that referenced this pull request Mar 26, 2026
# Description

Adds highly visible installer warnings when `rad` is already present on
PATH from a different location. The shell installer now scans all PATH
entries instead of stopping at the first match, and the PowerShell
installer adopts the same behavior so both entry points warn about stale
binaries before reinstalling.

<img width="795" height="467" alt="image"
src="https://github.com/user-attachments/assets/d69c151a-cb9b-4498-be88-1c8eb35e8bc8"
/>

<img width="895" height="512" alt="image"
src="https://github.com/user-attachments/assets/2d586d58-4314-4a94-a253-a020ac8918ba"
/>

## Type of change

- This pull request fixes a bug in Radius and has an approved issue
(issue link required).

Fixes: #11518

## Contributor checklist
Please verify that the PR meets the following requirements, where
applicable:

- An overview of proposed schema changes is included in a linked GitHub
issue.
    - [ ] Yes <!-- TaskRadio schema -->
    - [x] Not applicable <!-- TaskRadio schema -->
- A design document PR is created in the [design-notes
repository](https://github.com/radius-project/design-notes/), if new
APIs are being introduced.
    - [ ] Yes <!-- TaskRadio design-pr -->
    - [x] Not applicable <!-- TaskRadio design-pr -->
- The design document has been reviewed and approved by Radius
maintainers/approvers.
    - [ ] Yes <!-- TaskRadio design-review -->
    - [x] Not applicable <!-- TaskRadio design-review -->
- A PR for the [samples
repository](https://github.com/radius-project/samples) is created, if
existing samples are affected by the changes in this PR.
    - [ ] Yes <!-- TaskRadio samples-pr -->
    - [x] Not applicable <!-- TaskRadio samples-pr -->
- A PR for the [documentation
repository](https://github.com/radius-project/docs) is created, if the
changes in this PR affect the documentation or any user facing updates
are made.
    - [ ] Yes <!-- TaskRadio docs-pr -->
    - [x] Not applicable <!-- TaskRadio docs-pr -->
- A PR for the [recipes
repository](https://github.com/radius-project/recipes) is created, if
existing recipes are affected by the changes in this PR.
    - [ ] Yes <!-- TaskRadio recipes-pr -->
    - [x] Not applicable <!-- TaskRadio recipes-pr -->

---------

Signed-off-by: Dariusz Porowski <3431813+DariuszPorowski@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
(cherry picked from commit 6dba830)
sk593 pushed a commit that referenced this pull request Mar 26, 2026
# Description

Adds highly visible installer warnings when `rad` is already present on
PATH from a different location. The shell installer now scans all PATH
entries instead of stopping at the first match, and the PowerShell
installer adopts the same behavior so both entry points warn about stale
binaries before reinstalling.

<img width="795" height="467" alt="image"
src="https://github.com/user-attachments/assets/d69c151a-cb9b-4498-be88-1c8eb35e8bc8"
/>

<img width="895" height="512" alt="image"
src="https://github.com/user-attachments/assets/2d586d58-4314-4a94-a253-a020ac8918ba"
/>

## Type of change

- This pull request fixes a bug in Radius and has an approved issue
(issue link required).

Fixes: #11518

## Contributor checklist
Please verify that the PR meets the following requirements, where
applicable:

- An overview of proposed schema changes is included in a linked GitHub
issue.
    - [ ] Yes <!-- TaskRadio schema -->
    - [x] Not applicable <!-- TaskRadio schema -->
- A design document PR is created in the [design-notes
repository](https://github.com/radius-project/design-notes/), if new
APIs are being introduced.
    - [ ] Yes <!-- TaskRadio design-pr -->
    - [x] Not applicable <!-- TaskRadio design-pr -->
- The design document has been reviewed and approved by Radius
maintainers/approvers.
    - [ ] Yes <!-- TaskRadio design-review -->
    - [x] Not applicable <!-- TaskRadio design-review -->
- A PR for the [samples
repository](https://github.com/radius-project/samples) is created, if
existing samples are affected by the changes in this PR.
    - [ ] Yes <!-- TaskRadio samples-pr -->
    - [x] Not applicable <!-- TaskRadio samples-pr -->
- A PR for the [documentation
repository](https://github.com/radius-project/docs) is created, if the
changes in this PR affect the documentation or any user facing updates
are made.
    - [ ] Yes <!-- TaskRadio docs-pr -->
    - [x] Not applicable <!-- TaskRadio docs-pr -->
- A PR for the [recipes
repository](https://github.com/radius-project/recipes) is created, if
existing recipes are affected by the changes in this PR.
    - [ ] Yes <!-- TaskRadio recipes-pr -->
    - [x] Not applicable <!-- TaskRadio recipes-pr -->

---------

Signed-off-by: Dariusz Porowski <3431813+DariuszPorowski@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
(cherry picked from commit 6dba830)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

install.sh does not detect previous installation and results in multiple binaries installed

6 participants