Repository navigation
[AppService] Fix troubleshoot report rendering on Windows - #34206
aamos-company wants to merge 8 commits into
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2d173c3e-9eaa-4c14-9f83-d6352e7f23bb
|
Thank you for your contribution aamos-company! We will review the pull request and get back to you soon. |
|
Automated sensitive-information remediation ran on this pull request.
X Engineering Agent does not modify source files. The PR creator must remove or replace each suspected value at the linked line:
If a credential was exposed, rotate or revoke it immediately. Detected values are never copied into this comment. ✅ Confirm the finding · ❌ Dispute the finding GitHub only supports a fixed reaction set, so 👍 represents ✅ and 👎 represents ❌. The bot-created reactions are only poll choices. |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2d173c3e-9eaa-4c14-9f83-d6352e7f23bb
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2d173c3e-9eaa-4c14-9f83-d6352e7f23bb
… reports Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2d173c3e-9eaa-4c14-9f83-d6352e7f23bb
… records Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2d173c3e-9eaa-4c14-9f83-d6352e7f23bb
…Kudu Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2d173c3e-9eaa-4c14-9f83-d6352e7f23bb
There was a problem hiding this comment.
🟢 Approval recommended
The focused compatibility changes are covered by relevant regression tests and introduce no unresolved issues.
0 open findings
What changed in this PR
Fixes App Service troubleshoot report rendering on Windows terminals using legacy encodings.
Changes:
- Replaces unsupported Unicode decorations with ASCII equivalents.
- Limits orphan startup summaries to five entries.
- Adds CP1252/CP437 regression tests.
| File | Description |
|---|---|
commands.py |
Makes the table-output hint ASCII-safe. |
_troubleshoot_status_report.py |
Uses ASCII formatting and caps orphan summaries. |
_troubleshoot_config_report.py |
Replaces Unicode report decorations with ASCII. |
test_webapp_commands_thru_mock.py |
Tests legacy encodings and orphan-summary limits. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
… all outputs Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2d173c3e-9eaa-4c14-9f83-d6352e7f23bb
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2d173c3e-9eaa-4c14-9f83-d6352e7f23bb
| from azure.cli.core.style import Style, print_styled_text | ||
|
|
||
|
|
||
| _MAX_ORPHAN_STARTUPS = 5 |
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |

Related command
• az webapp troubleshoot status
• az webapp troubleshoot config
Description
Fixes Windows encoding failures in the human-readable App Service troubleshoot output.
• Replaces Unicode hint markers and box-drawing characters with ASCII-compatible equivalents.
• Prevents UnicodeEncodeError failures under legacy Windows encodings such as CP1252 and CP437.
• Limits startup records from instances that no longer host the application to five across all output formats, including JSON and YAML.
• Links to the resolved Kudu /api/startuplogs/summary endpoint for the full 24-hour history.
• Preserves slot and custom SCM endpoint behavior.
• Adds regression coverage for legacy Windows encodings, report truncation, structured output, and Kudu URL propagation.
Validation
• Appservice pylint and flake8 checks pass.
• Status and config troubleshoot test suites pass.
• Strict CP1252 and CP437 rendering tests pass.
Testing Guide
History Notes
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.