Conversation
There was a problem hiding this comment.
Pull request overview
Moves the azd update experience out of the alpha-gated flow and into a preview/beta stage by removing the alpha.update feature toggle, updating user-facing messaging, and expanding telemetry/error-handling for update scenarios.
Changes:
- Removes the
alpha.updatefeature gate and related wiring; update behavior is now always available (with a preview notice on first use). - Adds new update telemetry result codes and updates middleware to skip agentic error analysis for typed
update.UpdateErrors. - Updates documentation to reflect the new feature stage and adds
updateto the feature-stages list.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| cli/azd/resources/alpha_features.yaml | Removes the update alpha feature entry. |
| cli/azd/pkg/update/errors.go | Adds new telemetry result codes for config/invalid-input failures. |
| cli/azd/pkg/update/config.go | Removes alpha feature key and adds HasUpdateConfig helper. |
| cli/azd/main.go | Updates out-of-date banner guidance to conditionally suggest azd update. |
| cli/azd/docs/feature-stages.md | Lists update as Beta. |
| cli/azd/docs/design/azd-update.md | Updates design doc language from alpha-toggle to preview/always-available framing. |
| cli/azd/cmd/version.go | Removes alpha gating and always appends channel suffix in default version output. |
| cli/azd/cmd/version_test.go | Updates tests for new version output behavior. |
| cli/azd/cmd/update.go | Removes auto-enable alpha behavior; adds preview notice and new telemetry codes. |
| cli/azd/cmd/update_test.go | Adds test coverage for update telemetry code constants. |
| cli/azd/cmd/middleware/error.go | Skips agentic error analysis for update.UpdateError. |
| cli/azd/cmd/middleware/error_test.go | Adds tests ensuring UpdateError (and wrapped) is skipped. |
Comments suppressed due to low confidence (2)
cli/azd/main.go:128
- The update hint is now shown only when HasUpdateConfig(userCfg) is true. Since
azd updatemay not persist any updates.* config on a default run, users can repeatedly see platform-specific upgrade text even after usingazd update. Consider keying this decision off an explicit “update feature used/acknowledged” marker (or persisting default update config on first use) rather than the presence of updates.channel/checkIntervalHours.
// Show "azd update" hint if the user has update config set,
// otherwise show the original platform-specific upgrade instructions.
configMgr := config.NewUserConfigManager(config.NewFileConfigManager(config.NewManager()))
userCfg, cfgErr := configMgr.Load()
if cfgErr != nil {
userCfg = config.NewEmptyConfig()
}
if update.HasUpdateConfig(userCfg) {
fmt.Fprintln(
os.Stderr,
output.WithWarningFormat("To update to the latest version, run: azd update"))
} else {
upgradeText := platformUpgradeText()
fmt.Fprintln(
os.Stderr,
output.WithWarningFormat("To update to the latest version, %s", upgradeText))
}
cli/azd/cmd/version.go:87
- channelSuffix() now always returns " (stable)" for non-daily builds, which changes the default
azd versionoutput for stable releases (potentially breaking scripts that parse the exact output). If the goal is to indicate daily builds, consider only appending a suffix for daily builds (or gate the suffix behind an explicit config/flag) to preserve stable output compatibility.
// channelSuffix returns a display suffix like " (stable)" or " (daily)".
// Based on the running binary's version string, not the configured channel.
func (v *versionAction) channelSuffix() string {
// Detect from the binary itself: if the version contains "daily.", it's a daily build.
if _, err := update.ParseDailyBuildNumber(internal.Version); err == nil {
return " (daily)"
}
return " (stable)"
}
jongio
left a comment
There was a problem hiding this comment.
Reviewed 12 changed files. Clean alpha-to-preview promotion - the gate removal is thorough across all touchpoints.
The copilot bot's inline comments cover the main design gaps. One additional note:
- pkg/update/config.go:151 - HasUpdateConfig has no unit test
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (1)
cli/azd/cmd/update.go:145
- When switching channels, the in-memory channel is updated via
SaveChannelbut the error is ignored. If setting the config fails (e.g., due to invalid config backend state), the subsequent version check will run with the old channel whileconfigChangedis still set to true. Please handle and returnSaveChannelerrors here (and set the appropriate telemetry result) to keep behavior consistent.
if switchingChannels {
newChannel, err := update.ParseChannel(a.flags.channel)
if err != nil {
tracing.SetUsageAttributes(fields.UpdateResult.String(update.CodeInvalidInput))
return nil, err
}
_ = update.SaveChannel(userConfig, newChannel)
configChanged = true
hemarina
left a comment
There was a problem hiding this comment.
Code Review Summary
✅ What Looks Good
- Thorough alpha gate removal — all touchpoints cleaned up consistently across code, tests, config YAML, and docs
- Good telemetry coverage — new result codes (
CodeConfigFailed,CodeInvalidInput) added to all relevant error paths - Well-structured tests —
HasUpdateConfiggets comprehensive table-driven tests; error middleware tests cover both direct and wrappedUpdateError - Clean documentation updates — design doc and feature-stages.md properly updated to reflect Beta status
Findings Summary
| Priority | Count |
|---|---|
| Critical | 0 |
| High | 0 |
| Medium | 3 |
| Low | 2 |
| Total | 5 |
Overall Assessment: Clean promotion from alpha to beta. No blocking issues — the medium findings around backwards compatibility and error observability are worth considering but non-blocking.
Azure Dev CLI Install InstructionsInstall scriptsMacOS/Linux
bash: pwsh: WindowsPowerShell install MSI install Standalone Binary
MSI
Documentationlearn.microsoft.com documentationtitle: Azure Developer CLI reference
|
- Add 'update' command as Beta to feature-stages.md (PR Azure#7489) - Update azd-update.md design doc status to Beta, remove alpha toggle section - Add new layer-hooks.md documenting per-provisioning-layer hooks (PR Azure#7382) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Adapt test files to upstream changes from PR #7489 (move update from alpha to beta) which removed alphaFeatureManager from updateAction, versionAction, and their constructors. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…grpcserver (42.8% -> 58.0%) (#7496) * Phase 3: cmd package coverage 38.2% -> 55.0% (+721 stmts) Add 16 test files covering cmd constructors, flag parsing, Run() error paths, utility functions, and action methods (env*, config*, update, template, container, copilot, extensions). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Phase 3: pkg/project coverage 51.6% -> 65.0% (+640 stmts) Add 36 test files covering project config parsing, service resolution, framework services (Docker, SWA, custom, noop), service targets (App Service, Container App, DotNet Container App), scaffold generation, importer, infrastructure spec, container helpers, and service manager lifecycle methods (Package, Deploy, Publish, Build). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Phase 3: pkg/azapi coverage 31.9% -> 58.0% (+90 tests) Add 6 test files covering ResourceService operations, StandardDeployments (deploy, what-if, validate, provisioning states), Azure client services (APIM, AppConfig, LogAnalytics, ManagedHSM, WebApp), ManagedClusters, CognitiveService (AI models, usages, SKU locations), and all 42 resource type display name mappings. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Phase 3: pkg/pipeline coverage 30.1% -> 55.8% Add pipeline_coverage3_test.go covering GitHub CI/SCM providers, Azure DevOps CI/SCM providers, pipeline manager operations (configure, push, determineProvider, promptForProvider), mergeProjectVariablesAndSecrets (all 6 parameter branches), generateFilePaths, generatePipelineDefinition, and hasPipelineFile. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Phase 3: internal/grpcserver coverage 43.8% -> 60.0% (+295 stmts) Add 15 test files covering gRPC service handlers: prompt service (helpers, interactive, AI prompts), copilot service, environment service, project service, container/compose/deployment services, user config, AI model service, extension claims, workflow validation, account service, framework constructors, and server lifecycle. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Phase 3: Raise CI coverage gate 55% -> 58% Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix: CI lint, copyright headers, formatting, and review comments - Add missing copyright headers to 23 files - Fix struct field alignment via go fix (7 files) - Fix gofmt formatting (60+ files) - Fix gosec G306: change file permissions from 0o644 to 0o600 - Wrap lines exceeding 125 characters (~55 instances) - Remove unnecessary type assertions (staticcheck S1040) - Remove unused code (mockSource type, envLookup func) - Address Copilot review: fix parallel test race on global state, replace real browser invocation with mock, remove dead subtest, fix comment/assertion mismatch Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix: correct copyright headers to two-line format, remaining lint issues - Fix copyright headers to use two-line format expected by CI: Line 1: // Copyright (c) Microsoft Corporation. All rights reserved. Line 2: // Licensed under the MIT License. - Fix gosec G306 in round8 and service_target_appservice tests - Fix remaining long lines in managed_clusters, project_utils3, service_manager2 - Remove unused ptrStr function from copilot_service test Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix: gofmt alignment and remaining long lines Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix: address wbreza review -- meaningful assertions, deterministic tests, t.Context() - Replace constructor-only smoke tests with field-level assertions (actions_coverage3) - Fix environment-dependent tests by unsetting CI env vars (final_coverage3) - Add proper error assertions for discarded results (env_coverage3) - Replace 504 context.Background() calls with t.Context() across 25 files - Fix non-deterministic SaveConfigError test with specific error assertion - Convert prompt_service tests to table-driven pattern Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix: update tests for alphaFeatureManager removal after rebase Adapt test files to upstream changes from PR #7489 (move update from alpha to beta) which removed alphaFeatureManager from updateAction, versionAction, and their constructors. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Discussed offline with @rajeshkamal5050 and @kristenwomack to mark it as preview rather than alpha.
This pull request transitions the
azd updatecommand from an alpha feature behind a toggle to a default Beta feature, making it always available to users. It removes the alpha feature gating logic and updates the user experience to show a one-time Beta notice on first use. The PR also improves telemetry and error handling for update operations, and updates documentation to reflect the new Beta status.Feature stage and user experience changes:
alpha.updatefeature flag, makingazd updatealways available and no longer requiring an alpha config toggle. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13]azd updateas Beta, removes references to the alpha feature flag, and describes the new onboarding and configuration behavior. [1] [2] [3] [4] [5] [6]Error handling and telemetry improvements:
update.configFailed,update.invalidInput) and ensures these are set on relevant error paths. [1] [2] [3] [4]update.UpdateErrorare skipped from further error analysis, both directly and when wrapped, and adds tests for this behavior. [1] [2] [3] [4]Test and code cleanup:
These changes make the update experience more consistent and accessible for all users, while improving error reporting and telemetry for update-related operations.