Skip to content

feat: add metadata capability + fix flaky cache test#142

Merged
jongio merged 5 commits intomainfrom
azdextimprove
Feb 23, 2026
Merged

feat: add metadata capability + fix flaky cache test#142
jongio merged 5 commits intomainfrom
azdextimprove

Conversation

@jongio
Copy link
Copy Markdown
Owner

@jongio jongio commented Feb 23, 2026

Summary

Adds the metadata extension framework capability and fixes a flaky test.

Changes

Metadata Capability

  • Added metadata to extension.yaml capabilities
  • New commands/metadata.go using azdext.GenerateExtensionMetadata() for IntelliSense and CLI help

Test Fix

  • TestNewCacheManager was failing because findAzureDir walks up parent directories and finds a .azure dir above the temp dir. Fixed by using NewCacheManagerWithOptions with an explicit CacheDir to properly isolate the test.

Changes

  • 5 files changed, 46 insertions(+), 23 deletions(-)

jongio and others added 3 commits February 22, 2026 08:06
Add the metadata capability to the azd-app extension to enable:
- CLI help integration with rich usage information for all commands
- IntelliSense support for extension flags and arguments
- Auto-generated metadata from Cobra command tree using azdext helper

Changes:
- Add 'metadata' to capabilities in extension.yaml
- Create hidden metadata command using azdext.GenerateExtensionMetadata()
- Register metadata command in root command

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The test was failing because findAzureDir walks up parent directories
and finds a .azure dir above the temp dir, so it never creates one
in tempDir. Use NewCacheManagerWithOptions with explicit CacheDir
to properly isolate the test.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
github-actions bot added a commit that referenced this pull request Feb 23, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 23, 2026

🚀 Website Preview

Your PR preview was available here.

Preview has been cleaned up as the PR was closed.

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 23, 2026

Codecov Report

❌ Patch coverage is 0% with 17 lines in your changes missing coverage. Please review.
✅ Project coverage is 54.73%. Comparing base (ee35584) to head (441895a).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
cli/src/cmd/app/commands/metadata.go 0.00% 17 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #142      +/-   ##
==========================================
+ Coverage   54.56%   54.73%   +0.17%     
==========================================
  Files         147      148       +1     
  Lines       22285    22318      +33     
==========================================
+ Hits        12160    12216      +56     
+ Misses       9365     9338      -27     
- Partials      760      764       +4     
Flag Coverage Δ
unittests 54.73% <0.00%> (+0.17%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
cli/src/cmd/app/commands/metadata.go 0.00% <0.00%> (ø)

... and 4 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 23, 2026

🚀 Test This PR

A preview build (0.12.4-pr142) is ready for testing!

🌐 Website Preview

Live Preview: https://jongio.github.io/azd-app/pr/142/

One-Line Install (Recommended)

PowerShell (Windows):

iex "& { $(irm https://raw.githubusercontent.com/jongio/azd-app/main/cli/scripts/install-pr.ps1) } -PrNumber 142 -Version 0.12.4-pr142"

Bash (macOS/Linux):

curl -fsSL https://raw.githubusercontent.com/jongio/azd-app/main/cli/scripts/install-pr.sh | bash -s 142 0.12.4-pr142

Uninstall

When you're done testing:

PowerShell (Windows):

iex "& { $(irm https://raw.githubusercontent.com/jongio/azd-app/main/cli/scripts/uninstall-pr.ps1) } -PrNumber 142"

Bash (macOS/Linux):

curl -fsSL https://raw.githubusercontent.com/jongio/azd-app/main/cli/scripts/uninstall-pr.sh | bash -s 142

Build Info:

What to Test:
Please review the PR description and test the changes described there.

Pin go.mod to azd-core v0.5.2-0.20260223042348-df3319c65059 which includes
lint fixes, macOS symlink test fix, and gofmt formatting.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
github-actions bot added a commit that referenced this pull request Feb 23, 2026
Replace pseudo-version with official tagged release.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
github-actions bot added a commit that referenced this pull request Feb 23, 2026
@jongio jongio merged commit 6fd3ef3 into main Feb 23, 2026
15 checks passed
github-actions bot added a commit that referenced this pull request Feb 23, 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.

1 participant