Fix missing .gitignore in generated extensions and surface local registry gaps in azd x build#8550
Open
Copilot wants to merge 5 commits into
Open
Fix missing .gitignore in generated extensions and surface local registry gaps in azd x build#8550Copilot wants to merge 5 commits into
azd x build#8550Copilot wants to merge 5 commits into
Conversation
Co-authored-by: JeffreyCA <9157833+JeffreyCA@users.noreply.github.com>
Co-authored-by: JeffreyCA <9157833+JeffreyCA@users.noreply.github.com>
Co-authored-by: JeffreyCA <9157833+JeffreyCA@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add .gitignore to Go extension generation
Fix missing .gitignore in generated extensions and surface local registry gaps in Jun 5, 2026
azd x build
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes extension scaffolding and improves developer feedback in the microsoft.azd.extensions developer kit extension, addressing gaps encountered when generating and iterating on extensions via azd x init / azd x build. It also corrects extension framework service documentation examples.
Changes:
- Embed template dotfiles by switching to
//go:embed all:languages, ensuring generated extensions include language-specific.gitignorefiles. - Add a non-fatal
azd x buildwarning when the local source registry (~/.azd/registry.json) is missing/invalid or doesn’t contain the extension id (binaries are installed but the extension won’t appear inazd ext list). - Fix docs snippets for framework service registration and include the required
usageproperty in theextension.yamlexample.
Show a summary per file
| File | Description |
|---|---|
| cli/azd/extensions/microsoft.azd.extensions/version.txt | Bumps extension version to 0.11.2. |
| cli/azd/extensions/microsoft.azd.extensions/internal/resources/resources.go | Uses all: embedding to include dotfiles like .gitignore. |
| cli/azd/extensions/microsoft.azd.extensions/internal/resources/resources_test.go | Adds tests ensuring .gitignore files are embedded and Go template ignores bin/. |
| cli/azd/extensions/microsoft.azd.extensions/internal/cmd/build.go | Adds local-registry gap detection and warning text surfaced during azd x build. |
| cli/azd/extensions/microsoft.azd.extensions/internal/cmd/build_test.go | Adds unit tests for localRegistryWarning behavior. |
| cli/azd/extensions/microsoft.azd.extensions/extension.yaml | Updates extension manifest version to 0.11.2. |
| cli/azd/extensions/microsoft.azd.extensions/CHANGELOG.md | Adds release notes for 0.11.2 covering dotfile embedding and build warnings. |
| cli/azd/docs/extensions/extension-framework-services.md | Fixes WithFrameworkService example to pass a provider factory and adds usage to extension.yaml snippet. |
Copilot's findings
- Files reviewed: 8/8 changed files
- Comments generated: 1
📋 Prioritization NoteThanks for the contribution! The linked issue isn't in the current milestone yet. |
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.
Resolves #7926
This PR addresses feedback from authoring a Go extension via
azd x init, fixing a scaffolding gap, improvingazd x buildergonomics, and correcting the framework-services docs.Scaffolding: embed template dotfiles
The language templates ship a
.gitignore(the Go variant excludesbin/), but//go:embed languagessilently skips files whose names begin with.or_, so generated extensions had none. Switching to//go:embed all:languagesembeds the dotfiles. The only dotfiles under the templates are the four intended.gitignorefiles (go, python, dotnet, javascript) — there are no stray dotfiles or_-prefixed files that could leak into scaffolded output.azd x build: warn on local registry gapsAfter installing binaries,
buildnow emits a non-fatal warning when~/.azd/registry.jsonis missing or doesn't contain the extension. In that state the binaries are installed but the extension won't appear inazd ext list, so the message points the user atazd x packthenazd x publishto register it. This is the recovery the reporter had to reverse-engineer after a dev container rebuild wiped~/.azd. The warning messages are concise and use color to highlight commands and de-emphasize the registry path, which is shown in full so it remains copy-pasteable across platforms.Docs (
extension-framework-services.md)Corrected the "Register the Framework Service" snippet —
WithFrameworkServicetakes a provider factory, not an instance — and added theusageproperty to theextension.yamlsnippet.