-
Notifications
You must be signed in to change notification settings - Fork 267
Extension update fixes/enhancements #6604
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: JeffreyCA <9157833+JeffreyCA@users.noreply.github.com>
Co-authored-by: JeffreyCA <9157833+JeffreyCA@users.noreply.github.com>
Co-authored-by: JeffreyCA <9157833+JeffreyCA@users.noreply.github.com>
azd ext list
There was a problem hiding this 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 user experience of azd ext list by clarifying version information and adding visual indicators for available updates, addressing issue #6582.
Changes:
- Renamed "Version" column to "Latest Version" for clarity on what version is shown
- Added
*indicator next to installed versions when an update is available - Added
UpdateAvailablefield to JSON output for programmatic detection of updates - Fixed incorrect documentation paths in AGENTS.md and added CI build note
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| cli/azd/cmd/extension.go | Implements version comparison logic, adds UpdateAvailable field to output, renames column header, and adds asterisk indicator for updates |
| cli/azd/AGENTS.md | Corrects documentation paths to reflect current structure and adds helpful note about pre-building azd in CI environments |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@copilot apply changes based on the comments in this thread |
Co-authored-by: JeffreyCA <9157833+JeffreyCA@users.noreply.github.com>
Co-authored-by: JeffreyCA <9157833+JeffreyCA@users.noreply.github.com>
Co-authored-by: JeffreyCA <9157833+JeffreyCA@users.noreply.github.com>
Co-authored-by: JeffreyCA <9157833+JeffreyCA@users.noreply.github.com>
Addressed the review thread updates (guard against empty versions, update legend/upgrade hints, and formatting). Commit: 271fa4c. Screenshot: https://github.com/user-attachments/assets/ee006cab-86ac-4929-be5e-790a65a5e709 Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Co-authored-by: JeffreyCA <9157833+JeffreyCA@users.noreply.github.com>
azd ext listazd ext list
|
@copilot please revert changes under cli/azd/extensions/ |
Reverted the changes under cli/azd/extensions by restoring the extension dependency files to commit 81120a3. Commit: 0b4107e. Screenshot: https://github.com/user-attachments/assets/5f8a4e53-14d3-4fde-894f-8199533e69c4 Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
0b4107e to
ce6d409
Compare
azd ext list|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run azure-dev - cli |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Azure Dev CLI Install InstructionsInstall scriptsMacOS/Linux
bash: pwsh: WindowsPowerShell install MSI install Standalone Binary
MSI
Documentationlearn.microsoft.com documentationtitle: Azure Developer CLI reference
|
Fixes #6608
Fixes #6582
This PR fixes some bugs in the extension update warning feature and improves the
azd ext listoutput.Bug Fixes
1. Extension Data Corruption After Update Warning
Problem: After displaying an update notification, the next invocation of the extension command would fail - azd would behave as if the extension wasn't installed.
Root Cause: The update check goroutine created a shallow copy of the extension with only a subset of fields (
Id,Namespace,DisplayName,Description,Version,Source,LastUpdateWarning). WhenUpdateInstalled()saved this partial extension toconfig.json, critical fields likeCapabilitiesandPathwere lost. On the next CLI invocation, the extension couldn't be bound as a command becauseHasCapability(CustomCommandCapability)returned false.Fix: The goroutine now only copies the minimal fields needed for the update check. When saving the cooldown timestamp, it re-fetches the full extension from config before updating, ensuring no data loss.
2. Cooldown Recorded Even When Warning Not Displayed
Problem: If the extension command completed before the async update check finished, the warning wouldn't be shown (by design - zero latency impact), but the 24-hour cooldown was still recorded. This meant users might never see the update notification.
Root Cause: The cooldown timestamp was saved inside the async goroutine, before sending the result to the channel. If the main thread's non-blocking read hit the
defaultcase, the warning wasn't displayed but the cooldown was already persisted.Fix: Moved cooldown recording to the defer block that displays the warning. The timestamp is now only saved when the warning is actually shown to the user.
Improvements
Enhanced
azd ext listOutput*marker next to outdated installed versionsupdateAvailablebool JSON property in--output json