azd x: non-fatal metadata warnings and azd x init wizard polish#8197
Draft
Copilot wants to merge 1 commit into
Draft
azd x: non-fatal metadata warnings and azd x init wizard polish#8197Copilot wants to merge 1 commit into
azd x: non-fatal metadata warnings and azd x init wizard polish#8197Copilot wants to merge 1 commit into
Conversation
Copilot
AI
changed the title
[WIP] Fix azd x init to handle extension metadata warnings
Treat extension metadata warnings as non-fatal
May 15, 2026
7072a55 to
bac949d
Compare
`azd x build` previously treated validation warnings (e.g. missing `providers` when `service-target-provider` is declared) as failures. That aborted `azd x init`, and the build subprocess output was discarded so the user never saw why. Warning handling: - `ux.TaskList`: a task returning `(Warning, err)` no longer cancels subsequent tasks, and warning detail renders with warning styling instead of error styling. - Extract `validateExtensionMetadata` as a shared helper. `azd x init` validates the in-memory schema directly instead of shelling out to `azd x build` and parsing its rendered output. - Show a short summary in the task list and the full bulleted detail once below it. - Drop the redundant "Local extension source already exists." message. - Rephrase warnings to name the YAML field, the capability that needs it, and what to set. Wizard UX (resolves #8207): - Confirmation prompt defaults to "yes". - Tags prompt is optional; also fixes a pre-existing bug where parsed tags were discarded. - Translate dotted namespaces (`ai.project`) into the actual command path (`azd ai project <command>`) in the generated `usage` field and follow-up hints, matching how `bindExtension` registers them. - Generated `extension.yaml` includes a `yaml-language-server` header pointing at the published schema URL. Scaffolded extension root command: - The Go template set `Use` to `"azd <namespace> <command> [options]"`, so cobra parsed `"azd"` as the root command name and rendered `Usage: azd [command]`. Use the leaf segment of the namespace for both `Name` and `Use`, matching the convention in `azure.ai.agents`. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
bac949d to
47e5638
Compare
azd x: non-fatal metadata warnings and azd x init wizard polish
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.
This PR makes
azd x buildextension metadata warnings non-fatal so they no longer abortazd x init, and rolls in severalazd x initwizard fixes including Issue #8207.Warning handling
azd x buildpreviously treated validation warnings (e.g. missingproviderswhen theservice-target-providercapability is declared) as command failures.azd x initthen aborted on those warnings, and its build subprocess output was discarded so the user never saw why.ux.TaskList: a task returning(Warning, err)no longer cancels subsequent tasks, and warning details render with warning styling instead of error styling.azd x buildreports validation warnings via theux.Warningstate and reserves theux.Errorstate for missing required fields.validateExtensionMetadatais extracted as a shared helper soazd x initvalidates the in-memory schema directly. The old subprocess-output-parsing approach (ANSI stripping, marker probing, trailing-paren trimming) is gone.(-) Skippedtask line already conveys that).Wizard UX (resolves #8207)
tags:was always empty.ai.project) are translated into the actual command path (azd ai project <command>) when generating theusagefield and the "Try out the extension" follow-up hint, matching howbindExtensionregisters nested namespaces. The namespace prompt help text now explains this behavior.extension.yamlincludes a# yaml-language-server: $schema=...modeline pointing at the published schema URL so editor tooling validates the file out of the box.Scaffolded extension root command
The Go template produced
Use: "azd {{namespace}} <command> [options]", which made cobra parse"azd"as the command name and renderedUsage: azd [command]in the extension's own--helpoutput. The template now uses the leaf segment of the namespace for bothNameandUse(matching the convention inazure.ai.agents), soazd ai test --helpdisplaysUsage: test <command> [options]as expected.