Simplify "update available" banner and include link to release notes#7767
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Redesigns the CLI “update available” banner emitted on exit to be shorter and include a direct link to release notes (stable) or recent changes (daily), while also improving platform-specific upgrade guidance—especially for daily builds.
Changes:
- Adds a new
updatebanner renderer (RenderUpdateBanner) with release-notes linking and structured update hints. - Updates
main.goto use the new banner and to provide improved daily-build upgrade commands for script installers. - Adds unit tests covering banner rendering, update-hint formatting, and release-notes link selection.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
cli/azd/pkg/update/banner.go |
Introduces new banner rendering logic with release-notes links and structured update hints. |
cli/azd/pkg/update/banner_test.go |
Adds unit tests for banner output, hint formatting, and release-notes link behavior. |
cli/azd/main.go |
Switches exit-time update messaging to the new banner and enhances platform upgrade hints (including daily build args). |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
jongio
left a comment
There was a problem hiding this comment.
One follow-up on the Windows daily install command.
…all-azd.ps1` in cwd
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
kristenwomack
left a comment
There was a problem hiding this comment.
Thank you, @JeffreyCA! Looks great.
hemarina
left a comment
There was a problem hiding this comment.
Code Review Summary
Thank you Jeffrey for adding the banner redesign! 🎉
✅ What Looks Good
- Clean separation of concerns — Banner rendering extracted into a dedicated
banner.gowith well-defined types (BannerParams,UpdateHint,HintOption) - Idiomatic Go — Functional options pattern for
UpdateHint, proper use ofstrings.Builder, unexported implementation details with exported construction API - Thorough test suite — Covers stable/daily channels, run/visit hints, release notes links, empty hints, and negative assertions. The
disableTerminalFormattinghelper properly handlescolor.NoColor - Improved UX — Less alarmist tone ("Update available" vs "WARNING: out of date"), release-notes links, daily-aware install commands with
--version dailyflags - Prior review feedback fully addressed — Scriptblock form,
color.NoColorhandling, trailing slash fix
Findings Summary
| Priority | Count |
|---|---|
| Critical | 0 |
| High | 0 |
| Medium | 2 |
| Low | 1 |
| Total | 3 |
See inline comments for details. All findings are suggestions — no blockers.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Azure Dev CLI Install InstructionsInstall scriptsMacOS/Linux
bash: pwsh: WindowsPowerShell install MSI install Standalone Binary
MSI
Documentationlearn.microsoft.com documentationtitle: Azure Developer CLI reference
|
Resolves #4948
This PR redesigns the "update available" banner shown on CLI exit so the message is less verbose and more neutral sounding.
The updated banner now also links to the release notes or changes, depending on the update channel:
Release noteshttps://github.com/Azure/azure-dev/releases/tag/azure-dev-cli_<version>Recent changeshttps://github.com/Azure/azure-dev/commits/main(daily builds don't have GitHub releases)In addition, the guidance for daily builds (when
azd updateis ineligible) is enhanced to include flags like--version dailyforinstall-azd.shand-Version 'daily'forinstall-azd.ps1.The daily PowerShell command also switched from
-OutFile 'install-azd.ps1'; ./install-azd.ps1 -Version 'daily'to an in-memory scriptblock form so it no longer leaves a strayinstall-azd.ps1in the user's cwd (#7767 (comment)). The same form is used anywhere the command is suggested (cli/azd/main.go,cli/azd/cmd/update.go,cli/installer/README.md).Screenshots
Old update banner
Stable channel,
azd updateineligibleStable channel,
azd updateeligibleDaily channel,
azd updateineligibleDaily channel,
azd updateeligible