fix(extensions): fall back to azd for dependencies - #9537
fix(extensions): fall back to azd for dependencies#9537Victor Vazquez (vhvb1989) wants to merge 3 commits into
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: a8896629-6ee5-4061-8c90-c241c462ab8a
|
Azure Pipelines: Successfully started running 1 pipeline(s). 20 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
There was a problem hiding this comment.
Pull request overview
Adds dependency fallback from a parent extension source to the official azd registry.
Changes:
- Centralizes dependency source resolution and error classification.
- Applies fallback during installs and project auto-install discovery.
- Preserves registry isolation for bundle installs and adds tests/docs.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
cli/azd/pkg/extensions/manager.go |
Implements dependency fallback and source filtering. |
cli/azd/pkg/extensions/manager_test.go |
Tests fallback, classification, and bundle isolation. |
cli/azd/docs/extensions/extension-resolution-and-versioning.md |
Documents the resolution order. |
cli/azd/cmd/project_extension_auto_install.go |
Uses shared dependency resolution during discovery. |
cli/azd/cmd/extension.go |
Disables fallback for bundle installs and upgrades. |
cli/azd/cmd/auto_install.go |
Extends the auto-install manager contract. |
cli/azd/cmd/auto_install_test.go |
Updates the fake manager and fallback coverage. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: a8896629-6ee5-4061-8c90-c241c462ab8a
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.
Suppressed comments (2)
cli/azd/docs/extensions/extension-resolution-and-versioning.md:383
- [azd-code-reviewer] These troubleshooting rows again assume that the main registry participates in bundle installs. For an isolated bundle, publishing to the main registry cannot resolve either error, so distinguish normal registry installs from bundle installs in both the cause and remedy.
| *"dependency X not found"* | A recursive dependency is not installed and is missing from both the parent extension's source and the main `azd` registry. | Publish the dependency to either source or install it explicitly before installing the parent. |
| *"no version satisfies constraint"* | The dependency exists in the parent source or main `azd` registry, but none of its versions match the parent extension's constraint. | Publish a compatible dependency version or update the parent extension's constraint. |
cli/azd/docs/extensions/extension-resolution-and-versioning.md:178
- [azd-code-reviewer] This sentence implies the main registry is attempted for every dependency, but the bundle path deliberately disables that fallback. Qualify the two cases so this does not contradict the bundle-isolation rule above.
This issue also appears on line 382 of the same file.
If a required dependency cannot be resolved from the parent's source or the main `azd` registry and is not already installed, the install fails with an actionable error directing you to install the dependency first.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: a8896629-6ee5-4061-8c90-c241c462ab8a
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.
Suppressed comments (1)
cli/azd/pkg/extensions/manager.go:215
- [azd-code-reviewer] This source-selection check ignores
requiredAzdVersion. During CLI install/upgrade,opts.AzdVersionis enforced only after this returns, so a parent source whose semver-matching versions are all incompatible with the running azd is selected and fails without trying an azd-registry version that is compatible. Pass the running azd version into the internal resolver and usebestSatisfyingVersionForAzdwhen deciding whether to fall back; retain the nil-version behavior only for discovery flows that intentionally skip compatibility filtering.
if bestSatisfyingVersion(dependency.Version, matches[0].Versions) != nil {
return matches[0], nil
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 #8943
Allow extension dependencies to fall back to the official
azdregistry when no compatible version is available from the parent extension source.azd.Validation
go test ./pkg/extensions ./cmd