Skip to content

docs: document extension resolution algorithm and semver guidance#7836

Merged
wbreza merged 3 commits intoAzure:mainfrom
wbreza:docs/extension-resolution-versioning
Apr 22, 2026
Merged

docs: document extension resolution algorithm and semver guidance#7836
wbreza merged 3 commits intoAzure:mainfrom
wbreza:docs/extension-resolution-versioning

Conversation

@wbreza
Copy link
Copy Markdown
Contributor

@wbreza wbreza commented Apr 21, 2026

Summary

Creates comprehensive documentation for how azd resolves extensions from configured sources, including the resolution algorithm, version constraint syntax, azd version compatibility, caching behavior, semantic versioning guidance for extension authors, and troubleshooting.

Closes #6234

Changes

  • Added new doc cli/azd/docs/extensions/extension-resolution-and-versioning.md (298 lines) covering the full extension resolution and versioning story
  • Added cross-link from cli/azd/docs/extensions/extension-framework.md to the new doc for discoverability

Documentation Coverage

The new document covers:

  • Extension source types — configuration in config.yaml, alphabetical ordering, and source structure
  • Resolution algorithm — source iteration order, conflict handling, and no-failover behavior (first source wins or fails)
  • Version constraint syntax — exact, caret (^), tilde (~), range, and latest specifiers using Masterminds/semver/v3
  • requiredAzdVersion compatibility filtering — how extensions declare minimum azd version requirements and how the resolver filters candidates
  • End-to-end install flow — step-by-step walkthrough from azure.yaml to installed extension
  • azure.yaml requiredVersions.extensions configuration — how projects pin extension versions
  • Registry caching — 4-hour default TTL and the AZD_EXTENSION_CACHE_TTL environment variable override
  • Semantic versioning guidance for extension authors — when to bump major, minor, and patch versions with concrete examples
  • Troubleshooting table — 5 common error scenarios with symptoms, causes, and fixes

Testing

Documentation only — no code changes. Spell check passes with the project cspell configuration.

Add comprehensive documentation for how azd resolves extensions from
sources, including source ordering, version constraint syntax, azd
version compatibility, caching behavior, and troubleshooting. Includes
semantic versioning guidance for extension authors.

Closes Azure#6234

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@wbreza wbreza marked this pull request as ready for review April 21, 2026 18:55
Copilot AI review requested due to automatic review settings April 21, 2026 18:55
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new documentation page explaining how azd resolves extensions and selects versions, and links it from the main extension framework doc to improve discoverability.

Changes:

  • Added extension-resolution-and-versioning.md documenting sources, resolution, version constraints, compatibility checks, caching, and troubleshooting.
  • Linked the new doc from extension-framework.md Table of Contents.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 7 comments.

File Description
cli/azd/docs/extensions/extension-resolution-and-versioning.md New comprehensive doc for extension resolution/versioning behavior and guidance.
cli/azd/docs/extensions/extension-framework.md Adds a cross-link to the new resolution/versioning doc.

Comment thread cli/azd/docs/extensions/extension-resolution-and-versioning.md Outdated
Comment thread cli/azd/docs/extensions/extension-resolution-and-versioning.md Outdated
Comment thread cli/azd/docs/extensions/extension-resolution-and-versioning.md Outdated
Comment thread cli/azd/docs/extensions/extension-resolution-and-versioning.md Outdated
Comment thread cli/azd/docs/extensions/extension-resolution-and-versioning.md Outdated
Comment thread cli/azd/docs/extensions/extension-resolution-and-versioning.md Outdated
Comment thread cli/azd/docs/extensions/extension-resolution-and-versioning.md Outdated
Copy link
Copy Markdown
Member

@jongio jongio left a comment

Choose a reason for hiding this comment

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

Several sections describe intended design rather than current implementation. The automated reviewer caught most of these - I won't repeat those. One additional gap: azd init (initializeExtensions in cmd/init.go) doesn't call resolveCompatibleExtension, so extensions installed via azure.yaml bypass azd version compatibility filtering entirely. They can end up with versions incompatible with the running azd.

The accuracy issues should be resolved before merge since this doc will be the reference users and contributors rely on.

Comment thread cli/azd/docs/extensions/extension-resolution-and-versioning.md Outdated
Fix accuracy issues identified in review:
- Describe interactive source prompt for multi-source conflicts
- Correct version constraint behavior (CLI accepts exact/latest only)
- Fix compatibility filtering to describe filter-then-warn behavior
- Correct dependency resolution to same-source pinning
- Document azd init limitations (no version satisfaction check)
- Add cache filename sanitization details
- Fix prerelease selection behavior for latest

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@wbreza wbreza force-pushed the docs/extension-resolution-versioning branch from e3fafae to 9f3b36f Compare April 21, 2026 22:07
@wbreza wbreza requested a review from jongio April 21, 2026 22:08
Copy link
Copy Markdown
Member

@jongio jongio left a comment

Choose a reason for hiding this comment

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

The fixes in the second commit are solid. I verified each corrected section against the source code (source_manager.go, manager.go, extension.go, version_compatibility.go, registry_cache.go, init.go) and the doc now accurately reflects current behavior. One remaining gap noted inline.

Comment thread cli/azd/docs/extensions/extension-resolution-and-versioning.md Outdated
- Update line 149 to note dependencies don't go through requiredAzdVersion filtering
- Expand known limitations callout with explicit dependency resolution gap

Addresses review feedback from jongio on Azure#7836

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@wbreza wbreza enabled auto-merge (squash) April 22, 2026 22:16
@wbreza wbreza requested review from JeffreyCA and jongio April 22, 2026 22:16
Copy link
Copy Markdown
Contributor

@JeffreyCA JeffreyCA left a comment

Choose a reason for hiding this comment

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

Can we also create issues for some of the gaps mentioned in 1efe03c?

@wbreza
Copy link
Copy Markdown
Contributor Author

wbreza commented Apr 22, 2026

Created tracking issues for the three known limitations documented in the doc:

Thanks for flagging this!

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.

Document extension resolution algorithm and semver guidance

4 participants