Azure / Azure/azure-dev

Dependency (transitive) extension installation bypasses requiredAzdVersion filtering

Open
#7,888 0 comments 0 reactions 0 assignees View on GitHub
area/extensions engineering item
Dominant language
Go
Stars
569
Forks
364
Avg merge
2d 19h
Merged PRs (30d)
136

Description

## Origin

Identified during review of PR #7836 ([comment](https://github.com/Azure/azure-dev/pull/7836#discussion_r3125219623)) and documented as a known limitation in [extension-resolution-and-versioning.md](https://github.com/Azure/azure-dev/blob/docs/extension-resolution-versioning/cli/azd/docs/extensions/extension-resolution-and-versioning.md).

## Context

When an extension declares dependencies, the dependency installation path (`manager.go:386-414`) calls `Install()` directly without going through `resolveCompatibleExtension()`. This means `requiredAzdVersion` checks are only applied to the top-level extension, not to its transitive dependencies.

A dependency may be installed at a version whose `requiredAzdVersion` is not satisfied by the running `azd` version, potentially causing runtime failures.

## Scope

Update the dependency installation path in `pkg/extensions/manager.go` to apply `requiredAzdVersion` compatibility filtering when resolving and installing transitive dependencies.

## Acceptance Criteria

- [ ] Dependency installation applies `requiredAzdVersion` filtering
- [ ] If a dependency has no compatible version, the top-level install fails with a clear error
- [ ] If a newer incompatible dependency version exists, a warning is shown
- [ ] Unit tests cover dependency compatibility filtering

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.