Conversation
There was a problem hiding this comment.
Pull request overview
This pull request introduces a new MCP tool to provide targeted troubleshooting guidance for common Azure provisioning errors encountered during azd provision operations. The changes enhance error handling by leveraging this specialized tool and improve the robustness of solution extraction from LLM responses.
Changes:
- Added a new
provision_common_errorMCP tool with comprehensive troubleshooting instructions for 5 common error scenarios (service unavailability, role assignment authorization, role assignment conflicts, location restrictions, and VM quota issues) - Enhanced error handling middleware to prioritize solutions from the new tool for matching errors and improved JSON parsing with fallback extraction from error messages
- Added "centralus" to the spell-check dictionary
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| cli/azd/internal/mcp/tools/azd_provision_common_error.go | Defines the new provision_common_error tool with metadata and handler |
| cli/azd/internal/mcp/tools/prompts/azd_provision_common_error.md | Contains detailed troubleshooting instructions for 5 common provisioning error types with step-by-step guidance and example commands |
| cli/azd/internal/mcp/tools/prompts/prompts.go | Embeds the new prompt markdown file for the provision_common_error tool |
| cli/azd/cmd/middleware/error.go | Updates error handling middleware to check the provision_common_error tool and improves solution extraction to handle wrapped JSON responses |
| cli/azd/cmd/mcp.go | Registers the new provision_common_error tool in the MCP server |
| cli/azd/.vscode/cspell-azd-dictionary.txt | Adds "centralus" Azure region name to the spell-check dictionary |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
cli/azd/internal/mcp/tools/prompts/azd_provision_common_error.md
Outdated
Show resolved
Hide resolved
cli/azd/internal/mcp/tools/prompts/azd_provision_common_error.md
Outdated
Show resolved
Hide resolved
cli/azd/internal/mcp/tools/prompts/azd_provision_common_error.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Azure Dev CLI Install InstructionsInstall scriptsMacOS/Linux
bash: pwsh: WindowsPowerShell install MSI install Standalone Binary
MSI
Documentationlearn.microsoft.com documentationtitle: Azure Developer CLI reference
|
fix #6464
This pull request enhances error handling for Azure Developer CLI (azd) provisioning errors by introducing a new tool that provides targeted troubleshooting steps for common provisioning issues. It updates the error handling middleware to prioritize solutions from this new tool and improves the extraction of solutions from agent responses, including support for agent framework-wrapped JSON. Comprehensive tests are added to ensure robust solution extraction.
Error Handling Improvements
azd_provision_common_error, to provide specific troubleshooting instructions for common azd provisioning errors, such as quota issues, authorization failures, and service restrictions.error.go) to first check for solutions using the new tool and to extract solutions from error messages if the agent response parsing fails. [1] [2] [3]Agent Response Processing
extractSuggestedSolutionsfunction to handle agent framework responses wrapped in atextfield, enabling correct extraction of solutions from nested JSON structures.Testing
error_test.goto validate solution extraction from various agent response formats, including wrapped and malformed JSON.Miscellaneous
centralusto the cspell dictionary for improved spell checking in the codebase.