Skip to content

[App Service] az webapp create: Add enriched failure logs for quicker resolution - #33936

Open
Shi1810 wants to merge 2 commits into
Azure:devfrom
Shi1810:user/shikhajha/enrichedappcreate
Open

[App Service] az webapp create: Add enriched failure logs for quicker resolution#33936
Shi1810 wants to merge 2 commits into
Azure:devfrom
Shi1810:user/shikhajha/enrichedappcreate

Conversation

@Shi1810

@Shi1810 Shi1810 commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

🤖 PR Validation — ⚠️ Review suggested

Breaking Changes Tests
⚠️ None ️✔️ 130/130
⚠️AzureCLI-BreakingChangeTest
⚠️appservice
rule cmd_name rule_message suggest_message
⚠️ 1006 - ParaAdd webapp create cmd webapp create added parameter enriched_errors

Related command
az webapp create

Description
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
image
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
image

History Notes

[App Service] az webapp create: Add --enriched-errors parameter to see detailed failure log


This checklist is used to make sure that common guidelines for a pull request are followed.

@azure-client-tools-bot-prd

Copy link
Copy Markdown

Hi Shi1810,
Since the current milestone time is less than 7 days, this pr may not catch up with this release.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@a0x1ab

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).

@Shi1810
Shi1810 marked this pull request as ready for review August 20, 2026 08:12
@Shi1810
Shi1810 requested a review from a team as a code owner August 20, 2026 08:12
Copilot AI lite review requested due to automatic review settings August 20, 2026 08:12
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-errors to az webapp create and wires it into create_webapp to 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.

@a0x1ab

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants