[App Service] az webapp troubleshoot status: Provide latest application startup attempt data#33673
Conversation
|
Validation for Azure CLI Full Test Starting...
Thanks for your contribution! |
|
Hi @aamos-company, |
|
Validation for Breaking Change Starting...
Thanks for your contribution! |
|
Thank you for your contribution @aamos-company! We will review the pull request and get back to you soon. |
az webapp troubleshoot: provide latest application startup attempt data
There was a problem hiding this comment.
Pull request overview
This PR extends the App Service command module with new runtime-status troubleshooting capabilities by introducing a webapp status command (ARM siteStatus) and a preview webapp troubleshoot status command (ARM siteStatus + SCM startup summary), plus associated help, params, and tests.
Changes:
- Add
az webapp statusto fetch per-instance Site Runtime Status (ARMsiteStatus), including--instancefiltering and table formatting. - Add preview
az webapp troubleshoot statusto combine ARM runtime status with SCM startup summary, rendered as a human-readable report for table output. - Add scenario + mocked tests and a new recording; update HISTORY entry.
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/azure-cli/HISTORY.rst | Adds history note for the new az webapp status command. |
| src/azure-cli/azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py | Adds live scenario coverage for az webapp status. |
| src/azure-cli/azure/cli/command_modules/appservice/tests/latest/test_webapp_commands_thru_mock.py | Adds mocked unit tests for troubleshoot status, webapp status, and output transform behavior. |
| src/azure-cli/azure/cli/command_modules/appservice/tests/latest/recordings/test_webapp_status.yaml | Adds VCR recording for the new scenario test. |
| src/azure-cli/azure/cli/command_modules/appservice/custom.py | Implements show_webapp_status, troubleshoot_status, formatting, and status-tip logging. |
| src/azure-cli/azure/cli/command_modules/appservice/commands.py | Registers new commands and table transformers. |
| src/azure-cli/azure/cli/command_modules/appservice/_params.py | Adds --instance parameter wiring for webapp status and webapp troubleshoot status. |
| src/azure-cli/azure/cli/command_modules/appservice/_help.py | Adds help for webapp status and the preview webapp troubleshoot group/command. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
App Service |
az webapp troubleshoot: provide latest application startup attempt dataaz webapp troubleshoot status: provide latest application startup attempt data
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
az webapp troubleshoot status: provide latest application startup attempt dataaz webapp troubleshoot status: Provide latest application startup attempt data
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
Related command
az webapp troubleshoot statusDescription
Introduces the az webapp troubleshoot status command for diagnosing Linux web apps without leaving the terminal.
az webapp troubleshoot statusReports per-instance runtime health and recent startup outcomes for a Linux web app.
Data sources
• Site Runtime Status — ARM
GET .../sites/{name}[/slots/{slot}]/siteStatus[/{instanceId}]?api-version=2024-11-01• Per-instance startup summary — KuduLite
GET https://{scm-host}/api/startuplogs/summary[?instance={id}]• Machine-name ↔ ARM hex id mapping — ARM /instances , so --instance accepts either form.
What it surfaces
• Per-instance State + Details, LastError / LastErrorDetails / LastErrorTimestamp (hidden for Started instances or when there have been no failed startups in the report window), and the last 24h Succeeded / Failed / most-recent-attempt counts.
• Handles KuduLite SummaryFetchStatus failures gracefully (missing startup summary is reported per instance, not silently zeroed).
• Correlates orphan startup entries (instances the log endpoint knows about but ARM no longer lists) so nothing is dropped.
Testing Guide
Images attached in the comments
This 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.
🤖 PR Validation —⚠️ Review suggested