feat(install): add existing warning#11523
Conversation
Signed-off-by: Dariusz Porowski <3431813+DariuszPorowski@users.noreply.github.com>
There was a problem hiding this comment.
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.shto warn about existingradbinaries outside the target install directory. - Add equivalent PATH-wide warning behavior in
install.ps1for 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>
|
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 Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
…es and improve output formatting Signed-off-by: Dariusz Porowski <3431813+DariuszPorowski@users.noreply.github.com>
|
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 |
d648aa8 to
4825f9f
Compare
Radius functional test overviewClick here to see the test run details
Test Status⌛ Building Radius and pushing container images for functional tests... |
# 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)
# 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)
Description
Adds highly visible installer warnings when
radis 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.Type of change
Fixes: #11518
Contributor checklist
Please verify that the PR meets the following requirements, where applicable: