Repository navigation
feat(extensions): dependency-aware uninstall and ownership tracking - #9866
Conversation
|
Azure Pipelines: Successfully started running 1 pipeline(s). 21 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
2c4b36c to
61ead71
Compare
8fab975 to
6c8aaba
Compare
|
/azp run azure-dev - cli |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
3531ee7 to
a4a4ca3
Compare
Align the event comment and telemetry references with the span, which records both successful and failed extension uninstall attempts. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Ignore only missing installed records during dependency snapshot backfill and return malformed configuration errors to the caller. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Report dependency failures without hiding successful parent updates. Apply ownership and backfill edits to separate metadata snapshots and require matching installed sources and versions. Replan after declined dependency removal, preserve ownership of reused inferred providers, and clarify show output and confirmation prompts. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep command synopses focused on defaults and failure behavior. Shorten flag descriptions and cleanup prompts, consolidate lifecycle rules in the reference, and remove repeated explanations. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Restore pre-existing update command and flag descriptions while keeping the concise long descriptions and new uninstall help. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Wrap failed dependency results, including nested failures, instead of returning an opaque summary error. Cover error unwrapping and telemetry classification without changing the bare-error guard. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 23d3b019-1349-42b5-8227-1c4f4b387c99
f295ae2 to
3a378e0
Compare
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Mixed-case explicit installs bypass ownership promotion, and the mandatory telemetry privacy review remains incomplete.
Get a fresh assessment by requesting another Copilot review.
Review effort: Balanced (auto)
Findings: 1
Note
Copilot is running an experiment and ran this review at Balanced.
Open (1)
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
|

Fixes #8258
This PR makes
azd extension uninstalldependency-aware, records why each extension was installed, and reorganizesazd extension showso it can explain an extension's dependencies and dependents. It closes the gap where uninstalling themicrosoft.foundryextension pack stranded its seven dependencies and uninstalling one of those dependencies silently brokeazure.ai.agents.Ownership tracking
Each installed record now stores the installed version's dependency list and an
installedAsDependencyflag, so uninstall planning never needs registry access.requiredVersions.extensionsentries clear the dependency flag. Updates and reuse of inferred providers preserve ownership.Dependency-aware uninstall
The command plans the whole removal from the installed records before removing anything.
--forceis set.--no-promptaccepts removal. Declining or using--no-dependencieskeeps dependencies without bypassing protection of required extensions.--allruns through the same path.Uninstalling microsoft.foundry meta-package and dependencies:

Uninstalling microsoft.foundry meta-package only interactively:

Uninstalling microsoft.foundry meta-package only with

--no-dependencies:Uninstalling azure.ai.projects when other extensions depend on it:

Force-uninstalling azure.ai.projects when other extensions depend on it:

azd extension showThe layout follows
azd tool show, with compatibility, ownership, dependencies, and installed dependents. Empty rows are omitted.It prefers the installed source and uses local metadata when no registry lists the extension. Legacy dependency details never come from another source's release.
JSON output changes from PascalCase to camelCase keys and omits empty fields. This breaks the previous schema; the command group is beta and no in-repo consumer depends on it.
Telemetry
Adds one
ext.uninstallspan per attempted removal, including dependencies, using existing id, version, and source-category fields. Internal uninstalls during updates do not emit it.Testing
--force,--no-dependencies, legacy records, and blank ids.ext.uninstallspan, and show resolution, JSON shape, and display layout.azdregistry covering every scenario above withmicrosoft.foundry.Telemetry Change Checklist
New Fields
ext.uninstallspan reusesextension.id,extension.version, andextension.source.category)New Events
events/events.goconstwhose Go identifier containsEvent(end it withPrefixfor a prefix-match group) so the GDPR classifier discovers itdocs/specs/metrics-audit/telemetry-schema.mdprefix.noun.verb)Privacy
CustomerContentemitted in telemetryTesting
Downstream
Documentation
docs/specs/metrics-audit/feature-telemetry-matrix.md)docs/specs/metrics-audit/telemetry-schema.md)privacy-review-checklist.mdunchanged (nothing new is hashed)