Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the azd update design documentation to reflect a channel-management + manual-update approach (deferring auto-update), and adjusts the CLI implementation accordingly.
Changes:
- Remove auto-update from the design/feature description and focus the design doc on manual updates + channel switching.
- Drop the
--auto-updateflag wiring fromazd update. - Update the alpha feature description for
alpha.updateto match the revised scope.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
cli/azd/resources/alpha_features.yaml |
Updates the update alpha feature description to remove auto-update wording. |
cli/azd/docs/design/azd-update.md |
Revises the design doc to remove auto-update and expand/clarify manual update flows and channel switching behavior. |
cli/azd/cmd/update.go |
Removes the --auto-update flag registration and updates user-facing messaging. |
| // persistNonChannelFlags saves check-interval flags to config. | ||
| // Channel is handled separately to allow confirmation before persisting. | ||
| func (a *updateAction) persistNonChannelFlags(cfg config.Config) (bool, error) { | ||
| changed := false | ||
|
|
||
| if a.flags.autoUpdate != "" { | ||
| enabled := a.flags.autoUpdate == "on" | ||
| if a.flags.autoUpdate != "on" && a.flags.autoUpdate != "off" { | ||
| return false, fmt.Errorf("invalid auto-update value %q, must be \"on\" or \"off\"", a.flags.autoUpdate) | ||
| } | ||
| if err := update.SaveAutoUpdate(cfg, enabled); err != nil { | ||
| return false, err | ||
| } | ||
| changed = true | ||
| return false, fmt.Errorf( | ||
| "the --auto-update flag is work in progress. Run 'azd update' to update manually") | ||
| } |
There was a problem hiding this comment.
--auto-update is no longer registered as a flag (it was removed from Bind), so users will get Cobra's "unknown flag" error before reaching this handler. Keeping a.flags.autoUpdate checks here (and in onlyConfigFlagsSet) is effectively dead code and confusing. Either reintroduce the flag (hidden/deprecated) if you want this custom guidance, or remove the autoUpdate field and all related branches entirely.
|
|
||
| ### 1. Configuration | ||
|
|
||
| Three config keys via `azd config`: | ||
| Two config keys via `azd config`: | ||
|
|
||
| ```bash | ||
| azd config set updates.autoUpdate on # or "off" (default: off) | ||
| azd config set updates.channel daily # "stable" (default) or "daily" | ||
| ``` | ||
|
|
||
| Channel is set via `azd update --channel <stable|daily>` (which persists the choice to `updates.channel` config). Default channel is `stable`. |
There was a problem hiding this comment.
In the "Configuration" section, the text says "Two config keys" but the example only shows updates.channel, and the following sentence about the "on/off" convention for boolean-like values appears to be leftover from the removed auto-update design. Please either document both updates.channel and updates.checkIntervalHours (with examples), or adjust the wording to reflect what’s actually configurable now.
| description: "Enables support for services to use custom language." | ||
| - id: update | ||
| description: "Enables the azd update command for self-updating azd, including channel management and auto-update." | ||
| description: "Enables the azd update command for self-updating azd and channel management." |
There was a problem hiding this comment.
Minor wording: "self-updating azd and channel management" reads a bit awkwardly (it can sound like channel management is separate from updating). Consider rephrasing to something like "self-updating azd, including channel management" for clarity/parallelism with other feature descriptions.
| description: "Enables the azd update command for self-updating azd and channel management." | |
| description: "Enables the azd update command for self-updating azd, including channel management." |
| The entire update feature ships behind `alpha.update` (default: off). This means: | ||
|
|
||
| - **Toggle off** (default): Zero behavior changes. `azd version` output is the same. Update notification shows the existing platform-specific install instructions. `azd update` returns an error telling the user to enable the feature. | ||
| - **Toggle on** (`azd config set alpha.update on`): All update features are active — `azd update` works, auto-update stages/applies, `azd version` shows the channel suffix, notifications say "run `azd update`." | ||
| - **Toggle on** (`azd config set alpha.update on`): All update features are active — `azd update` works, `azd version` shows the channel suffix, notifications say "run `azd update`." |
There was a problem hiding this comment.
The "Toggle off" behavior described here says azd update returns an error telling the user to enable the feature. Current implementation in cmd/update.go auto-enables alpha.update when the user runs azd update and proceeds (it does not error). Please update this section to match the actual behavior (or adjust the code if the doc is the intended behavior).
Azure Dev CLI Install InstructionsInstall scriptsMacOS/Linux
bash: pwsh: WindowsPowerShell install MSI install Standalone Binary
MSI
Documentationlearn.microsoft.com documentationtitle: Azure Developer CLI reference
|
Fix #7002
This pull request removes support for the auto-update feature from the
azd updatecommand and its related documentation, focusing the update mechanism solely on manual updates and channel management. The codebase and design docs have been updated to reflect this change, ensuring that auto-update options are no longer available to users and that messaging is consistent with the new behavior.Feature Removal and User Experience:
--auto-updateflag from theazd updatecommand and its configuration logic, so users can no longer enable or disable auto-update via CLI or config. Attempts to use the flag now return a clear error message indicating the feature is a work in progress and only manual updates are supported. [1] [2]Documentation Updates:
azd-update.md) to remove all references to auto-update, including configuration keys, command-line flags, and update flows. The documentation now describes only manual update and channel management features. [1] [2] [3] [4] [5]Platform-Specific Guidance:
These changes simplify the update experience, reduce complexity, and set the stage for a future iteration if auto-update is reintroduced.