[Agents Extension] Update invalid manifest error message#7765
Conversation
… yaml. Signed-off-by: trangevi <trangevi@microsoft.com>
📋 Prioritization NoteThanks for the contribution! The linked issue isn't in the current milestone yet. |
There was a problem hiding this comment.
Pull request overview
This PR improves the Azure AI Agents extension’s UX when agent.yaml fails to parse/validate as an AgentManifest, returning a structured validation LocalError that includes a helpful suggestion (notably: check for a template field), addressing #7686.
Changes:
- Return a structured
azdext.LocalError(validation) when YAML unmarshal intoAgentManifestfails, including a suggestion to check fortemplate. - Add a unit test asserting the error is a validation
LocalErrorwith the expected code/category and a non-empty suggestion.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| cli/azd/extensions/azure.ai.agents/internal/pkg/agents/agent_yaml/parse.go | Converts unmarshal failures into a structured validation error with code and suggestion. |
| cli/azd/extensions/azure.ai.agents/internal/pkg/agents/agent_yaml/parse_test.go | Adds test coverage validating the structured error shape (code/category/message/suggestion). |
jongio
left a comment
There was a problem hiding this comment.
LGTM. The structured error with the template-field hint is a good UX improvement for the #7686 scenario.
One note: the Copilot bot's import ordering suggestion is incorrect - the PR's current ordering (stdlib, then local azureaiagent/..., then external github.com/...) matches the existing convention in map.go in this same package. I'd ignore that suggestion.
Signed-off-by: trangevi <trangevi@microsoft.com>
- Add .azdxignore support docs for azd x watch (PR Azure#7697) - Document reserved resource names preflight check (PR Azure#7746) - Add CHANGELOG entries for AI extension flag changes (PR Azure#7741) - Add CHANGELOG entries for Agents Extension RBAC fixes (PRs Azure#7763, Azure#7747, Azure#7765) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Provides additional guidance to check for a "template" field
Fixes #7686