Skip to content

Distinguish unsatisfied extension dependency constraints - #9360

Closed
JeffreyCA with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-extension-dependency-error-message
Closed

Distinguish unsatisfied extension dependency constraints#9360
JeffreyCA with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-extension-dependency-error-message

Conversation

Copilot AI commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Extension dependency resolution treated an unsatisfied version constraint as a missing dependency, producing misleading diagnostics.

  • Resolution

    • Retry by dependency ID within the parent’s source when a constrained lookup returns no matches.
    • Preserve existing successful and cross-source resolution behavior.
  • Diagnostics

    • Add DependencyVersionNotFoundError to distinguish constraint failures:
      dependency azure.ai.inspector required by azure.ai.agents was found, but no version satisfies constraint ">=1.2.0"
      
    • Retain the existing not-found error when the dependency ID is absent.
  • Coverage and documentation

    • Add regression coverage for both failure modes.
    • Document same-source dependency resolution and constraint mismatch guidance.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
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.

Co-authored-by: JeffreyCA <9157833+JeffreyCA@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix extension dependency install failure error message Distinguish unsatisfied extension dependency constraints Jul 29, 2026
Copilot AI requested a review from JeffreyCA July 29, 2026 22:48
@JeffreyCA
JeffreyCA requested a review from Copilot July 30, 2026 22:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Improves extension dependency diagnostics by distinguishing missing dependencies from unsatisfied version constraints.

Changes:

  • Adds a typed constraint-mismatch error and same-source retry.
  • Adds regression tests for both failure modes.
  • Documents resolution behavior and troubleshooting.
Show a summary per file
File Description
cli/azd/pkg/extensions/manager.go Classifies dependency resolution failures.
cli/azd/pkg/extensions/manager_test.go Tests failure classification.
cli/azd/docs/extensions/extension-resolution-and-versioning.md Updates diagnostic guidance.

Review details

  • Files reviewed: 3/3 changed files
  • Comments generated: 1
  • Review effort level: Balanced

Comment on lines +76 to +80
func (e *DependencyVersionNotFoundError) Error() string {
return fmt.Sprintf(
"dependency %s required by %s was found, but no version satisfies constraint %q",
e.DependencyId, e.ParentId, e.Constraint,
)
@JeffreyCA JeffreyCA closed this Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[microsoft.azd.extensions] Extension dependency install failure poorly distinguishes error

3 participants