Conversation
There was a problem hiding this comment.
Pull request overview
This PR enhances azd’s ARM deployment failure UX by adding targeted error-suggestion rules (with emphasis on Azure Container Apps) to the embedded error_suggestions.yaml, and updates/extends pipeline tests to cover the new match logic.
Changes:
- Added new YAML rules for
ContainerAppOperationError,InvalidTemplateDeployment(Container Apps-specific),RoleAssignmentExists, andInvalidResourceGroupLocation. - Refined the
RoleAssignmentExistsuser-facing message to better reflect “already configured” semantics. - Added unit tests for the new rule match scenarios and continued validation that the embedded YAML parses successfully.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
cli/azd/resources/error_suggestions.yaml |
Adds/updates ARM + Container Apps error suggestion rules and guidance text. |
cli/azd/pkg/errorhandler/pipeline_test.go |
Updates an expected RBAC message and adds tests for Container Apps template errors and RG-location mismatch handling. |
Telemetry Context: Container Apps Is the #1 ARM Failure TargetThis PR's focus on Container Apps error suggestions is well-placed. Deep dive data (March 2026, 23 days): Container Apps dominates every error category
Most affected app patterns
Container Apps + Python is the single worst combination (771 errors, 249 machines). The .NET Container Apps errors are mostly from Specific Container Apps errors this PR's rules should help
These are all diagnosable at error-suggestion time. Nice coverage with the new rules. |
Add InvalidTemplateDeployment rule with container app pattern matching and InvalidResourceGroupLocation rule for region mismatch errors. Enhance ContainerAppOperationError suggestion with revision list command and networking/scaling guidance. Improve RoleAssignmentExists suggestion with retry guidance. Fixes #7249 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use >- block scalar to avoid line breaks splitting CLI commands. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Added error suggestion rules for 5 additional Container Apps error codes surfaced in telemetry analysis (per @spboyer review comment): - ContainerAppInvalidName (45 errors, 455s avg wait) - ManagedEnvironmentNotReadyForAppCreation (15 errors) - ManagedEnvironmentInvalidName (12 errors) - InvalidEnvironmentId (14 errors) - MaxNumberOfEnvsExceeded (quota errors) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
93c262d to
b0f96f9
Compare
Azure Dev CLI Install InstructionsInstall scriptsMacOS/Linux
bash: pwsh: WindowsPowerShell install MSI install Standalone Binary
MSI
Documentationlearn.microsoft.com documentationtitle: Azure Developer CLI reference
|
Summary
Fixes #7249
Container Apps accounts for 41.5% of all ARM deployment failures (4,570 in March). This PR adds targeted error suggestions for the top Container Apps and ARM error codes that previously had no specific guidance.
New Error Rules
ContainerAppOperationErrorInvalidTemplateDeployment+ container appRoleAssignmentExistsInvalidResourceGroupLocationTest Coverage
TestPipeline_ContainerAppOperationError— verifies rule matchTestPipeline_InvalidTemplateDeployment_ContainerApp— verifies pattern + errorType combo match and negative case (non-CA template error)TestPipeline_InvalidResourceGroupLocation— verifies rule matchTestErrorSuggestionsYaml_IsValid— validates all YAML rules parse correctlyRelated