[App Service] az webapp create: Add enriched failure logs for quicker resolution - #33936
Open
Shi1810 wants to merge 2 commits into
Open
[App Service] az webapp create: Add enriched failure logs for quicker resolution#33936Shi1810 wants to merge 2 commits into
az webapp create: Add enriched failure logs for quicker resolution#33936Shi1810 wants to merge 2 commits into
Conversation
|
Hi Shi1810, |
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
microsoft-github-policy-service
Bot
requested review from
Yu Chen (jsntcy),
ZelinWang (wangzelin007),
Julie Zhu (yanzhudd) and
Yong Zhang (yonzhan)
August 20, 2026 06:31
Member
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds an opt-in --enriched-errors flag to az webapp create (Linux-only) so that common creation failures are rethrown as context-enriched diagnostics (error code + stage + suggested fixes + Copilot prompt) instead of only raw ARM/SDK errors.
Changes:
- Adds
--enriched-errorstoaz webapp createand wires it intocreate_webappto enrich Linux runtime validation and ARM create failures. - Introduces webapp-create-specific failure patterns and matching logic, plus context/message builders and a raiser API in the deployment context engine.
- Adds unit tests covering pattern matching, context/message formatting, and end-to-end behavior for enriched vs non-enriched paths.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/azure-cli/azure/cli/command_modules/appservice/custom.py | Adds enriched_errors handling to create_webapp, enriching Linux runtime validation and control-plane create failures. |
| src/azure-cli/azure/cli/command_modules/appservice/_params.py | Exposes --enriched-errors on az webapp create (Linux-only behavior). |
| src/azure-cli/azure/cli/command_modules/appservice/_deployment_failure_patterns.py | Adds webapp-create failure patterns and matching helper for common create-time failures. |
| src/azure-cli/azure/cli/command_modules/appservice/_deployment_context_engine.py | Adds context/message/raise helpers for enriched webapp-create errors. |
| src/azure-cli/azure/cli/command_modules/appservice/tests/latest/test_deployment_context_engine.py | Adds unit tests for webapp-create enrichment (match/build/format/raise). |
| src/azure-cli/azure/cli/command_modules/appservice/tests/latest/test_webapp_commands_thru_mock.py | Adds mocked tests validating enriched vs preserved exceptions for Linux/Windows create flows. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Member
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
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.
🤖 PR Validation —⚠️ Review suggested
Related command
az webapp createDescription
Currently, only raw error messages are logged in the event of webapp create command failures.
With this update, customers will have access to the --enriched-error feature flag, allowing them to view detailed failure logs and resolve errors more efficiently.
Note: these changes do not impact functions and windows app service.
Testing Guide


az webapp create -g $env:CREATE_TEST_RG -n "cli-create-cipher-$env:CREATE_TEST_SUFFIX" -p $env:CREATE_TEST_PLAN --container-image-name nginx:latest --min-tls-cipher-suite INVALID_CIPHER --enriched-errors true
az webapp create -g $env:ENRICHED_RUNTIME_RG -n "cli-runtime-on-1787211286" -p $env:ENRICHED_RUNTIME_PLAN --runtime PYTHON:99.99 --enriched-errors true
History Notes
[App Service]
az webapp create: Add--enriched-errorsparameter to see detailed failure logThis checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.