Skip to content

[App Service] Update functionapp commands to show warning for Linux consumption EOL and recommend Flex consumption for all consumption apps#33445

Open
patelchandni wants to merge 4 commits into
Azure:devfrom
patelchandni:cv1deprecation
Open

[App Service] Update functionapp commands to show warning for Linux consumption EOL and recommend Flex consumption for all consumption apps#33445
patelchandni wants to merge 4 commits into
Azure:devfrom
patelchandni:cv1deprecation

Conversation

@patelchandni
Copy link
Copy Markdown
Contributor

Related command

az functionapp
az functionapp create

Description

  • _params.py - Added a new functionapp argument context with a validator warn_linux_consumption_eol attached to the name argument to trigger EOL warnings on functionapp commands.
  • _validators.py - Added a new warn_linux_consumption_eol() function that:
    • Checks if a function app is running on Linux Consumption plan (Dynamic tier + reserved=True)
    • Displays a warning about Linux Consumption EOL on September 30, 2028 and recommends migrating to Flex Consumption with benefits: faster scaling, reduced cold starts, private networking
    • Added calls to this validator in 6 existing validators for functionapp operations
  • custom.py - Added warnings in create_functionapp():
    • For Linux Consumption: warns about EOL date and recommends Flex Consumption
    • For Windows Consumption: recommends Flex Consumption (no EOL warning)
  • test_functionapp_commands.py - Fixed a test command from functionapp delete to functionapp plan delete -y

Testing Guide

az functionapp create --resource-group <resource-group-name> --name <windows-function-app-name> --storage-account <storage-name> --consumption-plan-location eastus2
az functionapp create --resource-group <resource-group-name> --name <linux-function-app-name> --storage-account <storage-name> --consumption-plan-location eastus2 --runtime python --os-type Linux
az functionapp config show --resource-group <resource-group-name> --name <linux-function-app-name>

History Notes

[App Service] az functionapp: Add warning for Linux consumption EOL and recommend migration to Flex consumption
[App Service] az functionapp create: Add warning for Linux consumption EOL and recommend using Flex consumption


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

Copilot AI review requested due to automatic review settings May 26, 2026 19:39
@azure-client-tools-bot-prd
Copy link
Copy Markdown

azure-client-tools-bot-prd Bot commented May 26, 2026

️✔️AzureCLI-FullTest
️✔️acr
️✔️latest
️✔️3.12
️✔️3.13
️✔️acs
️✔️latest
️✔️3.12
️✔️3.13
️✔️advisor
️✔️latest
️✔️3.12
️✔️3.13
️✔️ams
️✔️latest
️✔️3.12
️✔️3.13
️✔️apim
️✔️latest
️✔️3.12
️✔️3.13
️✔️appconfig
️✔️latest
️✔️3.12
️✔️3.13
️✔️appservice
️✔️latest
️✔️3.12
️✔️3.13
️✔️aro
️✔️latest
️✔️3.12
️✔️3.13
️✔️backup
️✔️latest
️✔️3.12
️✔️3.13
️✔️batch
️✔️latest
️✔️3.12
️✔️3.13
️✔️batchai
️✔️latest
️✔️3.12
️✔️3.13
️✔️billing
️✔️latest
️✔️3.12
️✔️3.13
️✔️botservice
️✔️latest
️✔️3.12
️✔️3.13
️✔️cdn
️✔️latest
️✔️3.12
️✔️3.13
️✔️cloud
️✔️latest
️✔️3.12
️✔️3.13
️✔️cognitiveservices
️✔️latest
️✔️3.12
️✔️3.13
️✔️compute_recommender
️✔️latest
️✔️3.12
️✔️3.13
️✔️computefleet
️✔️latest
️✔️3.12
️✔️3.13
️✔️config
️✔️latest
️✔️3.12
️✔️3.13
️✔️configure
️✔️latest
️✔️3.12
️✔️3.13
️✔️consumption
️✔️latest
️✔️3.12
️✔️3.13
️✔️container
️✔️latest
️✔️3.12
️✔️3.13
️✔️containerapp
️✔️latest
️✔️3.12
️✔️3.13
️✔️core
️✔️latest
️✔️3.12
️✔️3.13
️✔️cosmosdb
️✔️latest
️✔️3.12
️✔️3.13
️✔️databoxedge
️✔️latest
️✔️3.12
️✔️3.13
️✔️dls
️✔️latest
️✔️3.12
️✔️3.13
️✔️dms
️✔️latest
️✔️3.12
️✔️3.13
️✔️eventgrid
️✔️latest
️✔️3.12
️✔️3.13
️✔️eventhubs
️✔️latest
️✔️3.12
️✔️3.13
️✔️feedback
️✔️latest
️✔️3.12
️✔️3.13
️✔️find
️✔️latest
️✔️3.12
️✔️3.13
️✔️hdinsight
️✔️latest
️✔️3.12
️✔️3.13
️✔️identity
️✔️latest
️✔️3.12
️✔️3.13
️✔️iot
️✔️latest
️✔️3.12
️✔️3.13
️✔️keyvault
️✔️latest
️✔️3.12
️✔️3.13
️✔️lab
️✔️latest
️✔️3.12
️✔️3.13
️✔️managedservices
️✔️latest
️✔️3.12
️✔️3.13
️✔️maps
️✔️latest
️✔️3.12
️✔️3.13
️✔️marketplaceordering
️✔️latest
️✔️3.12
️✔️3.13
️✔️monitor
️✔️latest
️✔️3.12
️✔️3.13
️✔️mysql
️✔️latest
️✔️3.12
️✔️3.13
️✔️netappfiles
️✔️latest
️✔️3.12
️✔️3.13
️✔️network
️✔️latest
️✔️3.12
️✔️3.13
️✔️policyinsights
️✔️latest
️✔️3.12
️✔️3.13
️✔️postgresql
️✔️latest
️✔️3.12
️✔️3.13
️✔️privatedns
️✔️latest
️✔️3.12
️✔️3.13
️✔️profile
️✔️latest
️✔️3.12
️✔️3.13
️✔️rdbms
️✔️latest
️✔️3.12
️✔️3.13
️✔️redis
️✔️latest
️✔️3.12
️✔️3.13
️✔️relay
️✔️latest
️✔️3.12
️✔️3.13
️✔️resource
️✔️latest
️✔️3.12
️✔️3.13
️✔️role
️✔️latest
️✔️3.12
️✔️3.13
️✔️search
️✔️latest
️✔️3.12
️✔️3.13
️✔️security
️✔️latest
️✔️3.12
️✔️3.13
️✔️servicebus
️✔️latest
️✔️3.12
️✔️3.13
️✔️serviceconnector
️✔️latest
️✔️3.12
️✔️3.13
️✔️servicefabric
️✔️latest
️✔️3.12
️✔️3.13
️✔️signalr
️✔️latest
️✔️3.12
️✔️3.13
️✔️sql
️✔️latest
️✔️3.12
️✔️3.13
️✔️sqlvm
️✔️latest
️✔️3.12
️✔️3.13
️✔️storage
️✔️latest
️✔️3.12
️✔️3.13
️✔️synapse
️✔️latest
️✔️3.12
️✔️3.13
️✔️telemetry
️✔️latest
️✔️3.12
️✔️3.13
️✔️util
️✔️latest
️✔️3.12
️✔️3.13
️✔️vm
️✔️latest
️✔️3.12
️✔️3.13

@azure-client-tools-bot-prd
Copy link
Copy Markdown

azure-client-tools-bot-prd Bot commented May 26, 2026

️✔️AzureCLI-BreakingChangeTest
️✔️Non Breaking Changes

@yonzhan
Copy link
Copy Markdown
Collaborator

yonzhan commented May 26, 2026

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

@github-actions
Copy link
Copy Markdown

The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR.

Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions).
After that please run the following commands to enable git hooks:

pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 aims to surface guidance in az functionapp flows by warning users about Linux Consumption end-of-life (Sep 30, 2028) and recommending migration to Flex Consumption, while also updating App Service functionapp tests/recordings.

Changes:

  • Adds a new warn_linux_consumption_eol helper and wires it into several validators to emit EOL/migration warnings.
  • Adds additional consumption-plan warnings during az functionapp create (Linux EOL + Flex recommendation; Windows recommendation).
  • Updates scenario tests and recordings (PowerShell runtime version expectations, plan deletion command/recordings).

Reviewed changes

Copilot reviewed 5 out of 32 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
src/azure-cli/azure/cli/command_modules/appservice/_params.py Adds warn_linux_consumption_eol as an argument validator for functionapp --name.
src/azure-cli/azure/cli/command_modules/appservice/_validators.py Introduces warn_linux_consumption_eol and invokes it from multiple validators.
src/azure-cli/azure/cli/command_modules/appservice/custom.py Emits new warnings during create_functionapp for consumption plans.
src/azure-cli/azure/cli/command_modules/appservice/tests/latest/test_functionapp_commands.py Updates PowerShell version expectations and fixes an incorrect delete command.
src/azure-cli/azure/cli/command_modules/appservice/tests/latest/recordings/test_functionapp_on_windows_app_service_dotnet_with_runtime_version.yaml Re-recorded HTTP interactions reflecting updated runtime/locations and request payloads.
src/azure-cli/azure/cli/command_modules/appservice/tests/latest/recordings/test_functionapp_elastic_plan.yaml Re-recorded interactions reflecting functionapp plan delete behavior and updated locations.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +97 to +103
with self.argument_context('functionapp') as c:
c.ignore('app_instance')
c.argument('resource_group_name', arg_type=resource_group_name_type)
c.argument('location', arg_type=get_location_type(self.cli_ctx))
c.argument('slot', options_list=['--slot', '-s'],
help="the name of the slot. Default to the productions slot if not specified")
c.argument('name', arg_type=functionapp_name_arg_type, validator=warn_linux_consumption_eol)
Comment on lines +214 to +222
resource_group_name = getattr(namespace, 'resource_group_name', None)
name = _get_app_name(namespace)
slot = getattr(namespace, 'slot', None)
if not name or not resource_group_name:
return

functionapp = _generic_site_operation(cmd.cli_ctx, resource_group_name, name, 'get', slot)
if functionapp is None:
return
Comment on lines +214 to +218
resource_group_name = getattr(namespace, 'resource_group_name', None)
name = _get_app_name(namespace)
slot = getattr(namespace, 'slot', None)
if not name or not resource_group_name:
return
Comment on lines 665 to 675
def validate_app_is_functionapp(cmd, namespace):
client = web_client_factory(cmd.cli_ctx)
name = _get_app_name(namespace)
rg = namespace.resource_group
app = get_resource_if_exists(client.web_apps, name=name, resource_group_name=rg)
if is_logicapp(app):
raise ValidationError(f"App '{name}' in group '{rg}' is a logic app.")
if is_webapp(app):
raise ValidationError(f"App '{name}' in group '{rg}' is a web app.")
warn_linux_consumption_eol(cmd, namespace)


# Show warnings for Consumption plan (Linux or Windows)
# Check if using --consumption-plan-location OR --plan with a consumption SKU (Dynamic tier)
is_consumption_plan = consumption_plan_location is not None or (plan_info and plan_info.sku.tier == 'Dynamic')
Comment on lines +8632 to +8638
logger.warning(
"Linux Consumption will reach EOL on September 30 2028 and will no longer be supported. "
"Flex Consumption is now the recommended serverless hosting plan for Azure Functions. "
"It offers faster scaling, reduced cold starts, private networking, and more control over "
"performance and cost. Help link: "
"https://learn.microsoft.com/en-us/azure/azure-functions/migration/migrate-plan-consumption-to-flex"
)
if plan_info.sku.tier == 'Dynamic':
logger.warning(
"Migrate your app to Flex Consumption as Linux Consumption will reach EOL on "
"September 30 2028 and will no longer be supported. Flex Consumption is now the "
@yonzhan yonzhan assigned yanzhudd and unassigned zhoxing-ms May 26, 2026
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.

5 participants