Skip to content

azd init does not apply requiredAzdVersion compatibility filtering for extensions #7887

@wbreza

Description

@wbreza

Origin

Identified during review of PR #7836 (comment) and documented as a known limitation in extension-resolution-and-versioning.md.

Context

When azd init installs extensions declared in azure.yaml, it calls Install() directly without going through resolveCompatibleExtension(). This means requiredAzdVersion checks are not applied, and an extension version that is incompatible with the running azd version may be installed.

By contrast, azd extension install does apply requiredAzdVersion filtering, warning the user if a newer incompatible version exists and selecting the latest compatible version.

Scope

Update the initializeExtensions path in cmd/init.go to call resolveCompatibleExtension() (or equivalent logic) so that requiredAzdVersion filtering is applied during azd init.

Acceptance Criteria

  • azd init applies requiredAzdVersion compatibility filtering when installing extensions
  • If no compatible version exists, the user receives a clear error with guidance to upgrade azd
  • If a newer incompatible version exists, a warning is shown (consistent with azd extension install)
  • Unit tests cover the compatibility filtering scenario during init

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions