Skip to content

[AppService] Fix #33732: az webapp show: Restore appServicePlanId in output - #34149

Open
Shreyas Gopalakrishna (shreyas-gopalakrishna) wants to merge 1 commit into
Azure:devfrom
shreyas-gopalakrishna:developer/shreyasg/fix-webapp-show-list-output
Open

Shreyas Gopalakrishna (shreyas-gopalakrishna) wants to merge 1 commit into
Azure:devfrom
shreyas-gopalakrishna:developer/shreyasg/fix-webapp-show-list-output

Conversation

@shreyas-gopalakrishna

Copy link
Copy Markdown
Member

Related command

  • az webapp show
  • az webapp list
  • az functionapp list --output table

Description

Fixes #33732
Fixes #33914

Supersedes #33733.

azure-mgmt-web 11.0.0 changed Site models to TypeSpec-generated hybrid models. Adding an undeclared app_service_plan_id attribute no longer affects CLI serialization, so az webapp show/list exposed serverFarmId instead of the established appServicePlanId field. The missing field also caused table formatting to raise KeyError for affected Function App responses.

This change:

  • Serializes Site models before normalizing their output.
  • Restores the pre-upgrade Web App shape: appServicePlanId is present and serverFarmId is removed from az webapp show/list.
  • Adds appServicePlanId while retaining serverFarmId for Function App and Logic App compatibility.
  • Makes table formatting tolerate responses with no App Service Plan ID.
  • Adds SDK-model unit coverage and Web App list/show scenario assertions.

Testing Guide

az webapp show -g <resource-group> -n <webapp> --query "{appServicePlanId:appServicePlanId,serverFarmId:serverFarmId}"
az webapp list -g <resource-group> --query "[].{name:name,appServicePlanId:appServicePlanId,serverFarmId:serverFarmId}"
az functionapp list -g <resource-group> --output table

Local validation:

  • 182 App Service tests passed, plus 2 subtests.
  • azdev style appservice
  • azdev linter appservice
  • git diff --check

History Notes

[AppService] az webapp show/list: Restore appServicePlanId in output
[AppService] az functionapp list --output table: Handle apps without an App Service Plan ID


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

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings September 29, 2026 18:27
@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.

Copilot review overview

🟢 Approval recommended

The implementation addresses both reported regressions with focused compatibility coverage.

Review effort: Balanced
Findings: None

What changed in this PR

Restores established App Service Plan identifiers in AppService command output and prevents table-formatting failures.

Changes:

  • Normalizes serialized Site models for Web, Function, and Logic Apps.
  • Safely handles missing plan IDs.
  • Adds unit and scenario coverage.
File Description
appservice/​commands.py Adds output normalization and safe table formatting.
tests/​latest/​test_webapp_commands.py Verifies Web App list/show output compatibility.
tests/​latest/​test_webapp_commands_thru_mock.py Tests model serialization and missing-plan behavior.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@shreyas-gopalakrishna

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Commenter does not have sufficient privileges for PR 34149 in repo Azure/azure-cli

@a0x1ab

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

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

@shreyas-gopalakrishna

Copy link
Copy Markdown
Member Author

Aditya Pujara (@a0x1ab) Yong Zhang (@yonzhan) could you review this PR
Python312 tests got canceled due to the 10 min timeout, please reschedule it. I do not have access

@yonzhan

Copy link
Copy Markdown
Collaborator

Please fix CI issues

@yonzhan Yong Zhang (yonzhan) added this to the Backlog milestone Sep 29, 2026
@shreyas-gopalakrishna

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Commenter does not have sufficient privileges for PR 34149 in repo Azure/azure-cli

@yonzhan

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

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

This branch has not been deployed

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

Labels

act-observability-squad Auto-Assign Auto assign by bot Functions az functionapp Web Apps az webapp

Projects

None yet

Development

Successfully merging this pull request may close these issues.

az functionapp list --output table fails when appServicePlanId is absent az webapp show and list returning serverFarmId instead of appServicePlanId

5 participants