feat: add metadata capability + fix flaky cache test#142
Merged
Conversation
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>
Contributor
|
🚀 Website Preview
Preview has been cleaned up as the PR was closed. |
Codecov Report❌ Patch coverage is
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
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Contributor
🚀 Test This PRA preview build ( 🌐 Website PreviewLive 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-pr142UninstallWhen 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 142Build Info:
What to Test: |
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>
Replace pseudo-version with official tagged release. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the
metadataextension framework capability and fixes a flaky test.Changes
Metadata Capability
metadatatoextension.yamlcapabilitiescommands/metadata.gousingazdext.GenerateExtensionMetadata()for IntelliSense and CLI helpTest Fix
TestNewCacheManagerwas failing becausefindAzureDirwalks up parent directories and finds a.azuredir above the temp dir. Fixed by usingNewCacheManagerWithOptionswith an explicitCacheDirto properly isolate the test.Changes