[App Service] az webapp deploy, az webapp up: Add enriched deployment failure logs for quicker resolution#32940
Conversation
️✔️AzureCLI-FullTest
|
|
| rule | cmd_name | rule_message | suggest_message |
|---|---|---|---|
| webapp deploy | cmd webapp deploy added parameter enriched_errors |
||
| webapp up | cmd webapp up added parameter enriched_errors |
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR. Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
There was a problem hiding this comment.
Pull request overview
Adds a context-enriched deployment error experience for App Service webapp deployments so failures produce a structured “Copilot context” block (errorCode/stage/metadata/causes/fixes) instead of generic status-only errors.
Changes:
- Introduces a deployment failure pattern catalog and a context builder/formatter for enriched CLI errors.
- Wraps zip deploy + OneDeploy flows in
appservice/custom.pyto raise enriched errors for webapps (skipping function apps). - Adds unit tests covering pattern matching, context building, formatting, and end-to-end error flow simulation.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
src/azure-cli/azure/cli/command_modules/appservice/custom.py |
Hooks enriched error raising into zipdeploy and OneDeploy error paths. |
src/azure-cli/azure/cli/command_modules/appservice/_deployment_failure_patterns.py |
Defines known failure patterns and matching heuristics. |
src/azure-cli/azure/cli/command_modules/appservice/_deployment_context_engine.py |
Builds YAML “Copilot context” + formatted enriched deployment error message. |
src/azure-cli/azure/cli/command_modules/appservice/tests/latest/test_deployment_context_engine.py |
Unit/integration-style tests for the new pattern/context/error flow. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
az webapp deploy az webapp up az webapp deployment source config-zip Added enriched deployment failure promptaz webapp deploy, az webapp up, az webapp deployment source config-zip - Added enriched deployment failure prompt
…shikhajha/errorcontext
az webapp deploy, az webapp up - Added enriched deployment failure promptaz webapp deploy, az webapp up : Added enriched deployment failure logs for quicker resolution
az webapp deploy, az webapp up : Added enriched deployment failure logs for quicker resolutionaz webapp deploy, az webapp up : Add enriched deployment failure logs for quicker resolution
…shikhajha/errorcontext
az webapp deploy, az webapp up : Add enriched deployment failure logs for quicker resolutionaz webapp deploy, az webapp up: Add enriched deployment failure logs for quicker resolution
…shikhajha/errorcontext

Related command
az webapp deployaz webapp upDescription
Currently, only raw error messages are logged in the event of deployment failures.
With this update, customers will have access to the
--enriched-errorfeature flag, allowing them to view detailed failure logs and resolve errors more efficiently.This feature flag will be available for the
az webapp deployandaz webapp updeployment commands.Note: these changes do not impact functions and windows app service.
Testing Guide


History Notes
[App Service]
az webapp up/deploy: Add--enriched-errorsparameter to see detailed deployment 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.