Skip to content

[App Service] az webapp show-runtime-version: Add command to show the resolved Linux runtime version - #34444

Open
faditawfik21 wants to merge 1 commit into
Azure:devfrom
faditawfik21:faditawfik/webapp-show-runtime-version
Open

faditawfik21 wants to merge 1 commit into
Azure:devfrom
faditawfik21:faditawfik/webapp-show-runtime-version

Conversation

@faditawfik21

@faditawfik21 faditawfik21 commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

🤖 PR Validation — ⚠️ Review suggested

Breaking Changes Tests Suppressions
⚠️ None ️✔️ 130/130 ️✔️ None
⚠️AzureCLI-BreakingChangeTest
⚠️appservice
rule cmd_name rule_message suggest_message
⚠️ 1001 - CmdAdd webapp show-runtime-version cmd webapp show-runtime-version added

Related command

az webapp show-runtime-version

Description

Adds a new preview command az webapp show-runtime-version to retrieve the platform-resolved Linux runtime stack and patch version currently running on a web app or deployment slot (for example, PYTHON-3.12.7) via GET .../sites/{name}[/slots/{slot}]/runtimeVersion?api-version=2024-11-01.

Today, inspecting the actual patch version selected by Linux App Service after platform stack updates requires opening an SSH session into the container. This command surfaces the live resolved runtime version directly from the CLI (json, tsv, and table output), validates that the target is a Linux web app, and returns clear error messages when runtime version info is unavailable (such as custom container images or apps that have not started yet).

Fixes AB#40698179

Testing Guide

# Show the resolved runtime version for a Linux web app
az webapp show-runtime-version --name MyWebApp --resource-group MyResourceGroup

# Show the resolved runtime version in table format
az webapp show-runtime-version --name MyWebApp --resource-group MyResourceGroup --output table

# Show the resolved runtime version for a deployment slot
az webapp show-runtime-version --name MyWebApp --resource-group MyResourceGroup --slot staging

Validation run locally:

  • azdev style appservice (pylint + flake8 passed)
  • azdev test test_webapp_commands_thru_mock --discover (all tests passed, including 8 new unit and CLI invocation tests in TestShowWebappRuntimeVersionMocked)

History Notes

[App Service] az webapp show-runtime-version: Add preview command to show the resolved platform runtime version running on a Linux web app


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

Copilot AI balanced review requested due to automatic review settings November 17, 2026 18:38
@microsoft-github-policy-service microsoft-github-policy-service Bot added the customer-reported Issues that are reported by GitHub users external to the Azure organization. label Nov 17, 2026
@microsoft-github-policy-service

Copy link
Copy Markdown
Contributor

Thank you for your contribution faditawfik21! We will review the pull request and get back to you soon.

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.

🔵 Needs a closer look

The raw ARM runtimeVersion API has only mocked coverage, requiring service-owner confirmation of the 2024-11-01 endpoint, response schema, and unavailable-runtime behavior for production and deployment-slot resources.

No open issues 🎉

What changed in this PR

Adds the preview command az webapp show-runtime-version to App Service commands, exposing the platform-resolved Linux runtime stack and patch version without requiring an SSH session.

Changes:

  • Retrieves runtime information for web apps and deployment slots, with Linux validation and errors for unavailable information.
  • Adds command arguments, help examples, and table formatting.
  • Adds mocked tests for successful responses, error handling, slot targeting, and CLI output.
File Description
src/​azure-cli/​azure/​cli/​command_modules/​appservice/​tests/​latest/​test_webapp_commands_thru_mock.py Adds runtime-version and CLI invocation tests.
src/​azure-cli/​azure/​cli/​command_modules/​appservice/​custom.py Implements runtime retrieval, validation, and error handling.
src/​azure-cli/​azure/​cli/​command_modules/​appservice/​commands.py Registers the preview command and table formatter.
src/​azure-cli/​azure/​cli/​command_modules/​appservice/​_params.py Defines web app name and slot arguments.
src/​azure-cli/​azure/​cli/​command_modules/​appservice/​_help.py Documents the command with app and slot examples.

Review effort: Balanced

@x-engineering-agent

Copy link
Copy Markdown
Contributor

Hi faditawfik21,
Since the current milestone time is less than 7 days, this pr will be reviewed in the next milestone.

@yonzhan

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

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

@azure-pipelines

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

Adds the preview 'az webapp show-runtime-version' command to query the platform-resolved Linux runtime stack and patch version via the ARM /runtimeVersion endpoint (AB#40698179).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@faditawfik21
faditawfik21 force-pushed the faditawfik/webapp-show-runtime-version branch from 8175f4d to fec360b Compare November 18, 2026 17:18
@yonzhan

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

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

slot_segment = '/slots/{}'.format(quote(slot, safe='')) if slot else ''
arm_url = (
'{rm}/subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.Web'
'/sites/{name}{slot_seg}/runtimeVersion?api-version={ver}'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Correct me if I'm wrong - wasn't Byron's ask to have role instance to runtime version mapping? https://msazure.visualstudio.com/Antares/_workitems/edit/40698179

Doesn't this call the app-level /runtimeVersion once, and therefore we only get the runtime of the instance selected by the service?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

You're right, that was the original plan, but based on a discussion with Tulika, Surender, and Gillian we decided to skip the per-instance backend changes for now and just use the existing /runtimeVersion API to get this out sooner.

@faditawfik21

Copy link
Copy Markdown
Contributor Author

Jordan Selig (@seligj95) could you please take a look when you get a chance?

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

customer-reported Issues that are reported by GitHub users external to the Azure organization. Web Apps az webapp

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants