Skip to content

azd init does not verify installed extension satisfies configured version constraint #7886

@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 processes the requiredVersions.extensions map in azure.yaml, it checks whether each extension is already installed. If an extension is installed at any version, azd init skips it — it does not verify that the installed version satisfies the configured version constraint.

For example, if azure.yaml specifies >=2.0.0 but version 1.0.0 is installed, azd init silently moves on without upgrading or warning the user.

Scope

Update initializeExtensions in cmd/init.go to check whether the installed extension version satisfies the constraint declared in azure.yaml. If it does not, either:

  • Upgrade the extension to a version that satisfies the constraint, or
  • Warn the user that the installed version does not match

Acceptance Criteria

  • azd init checks the installed extension version against the azure.yaml constraint
  • If the installed version does not satisfy the constraint, the user is informed (warning or automatic upgrade)
  • Unit tests cover the version mismatch scenario

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