Skip to content

Conversation

@Tratcher
Copy link
Contributor

Related command
az containerapp env premium-ingress add/update

Description
In the prior PR I missed removing these obsolete parameters when copying over the commands. They are inoperative and were only temporarily available in the preview extension.

Testing Guide

History Notes


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 October 31, 2025 17:49
@azure-client-tools-bot-prd
Copy link

azure-client-tools-bot-prd bot commented Oct 31, 2025

❌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
Type Test Case Error Message Line
Failed test_functionapp_on_linux_consumption_python_39 self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f51e7f367b0>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f51ea944920>
command = 'functionapp create -g clitest.rg000001 -n functionapp-linux000003 -c ukwest -s clitest000002 --os-type linux --runtime python --functions-version 4 --runtime-version 3.9'
expect_failure = False

    def in_process_execute(self, cli_ctx, command, expect_failure=False):
        from io import StringIO
        from vcr.errors import CannotOverwriteExistingCassetteException
    
        if command.startswith('az '):
            command = command[3:]
    
        stdout_buf = StringIO()
        logging_buf = StringIO()
        try:
            # issue: stderr cannot be redirect in this form, as a result some failure information
            # is lost when command fails.
>           self.exit_code = cli_ctx.invoke(shlex.split(command), out_file=stdout_buf) or 0
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/azure-cli-testsdk/azure/cli/testsdk/base.py:303: 
                                        
env/lib/python3.12/site-packages/knack/cli.py:245: in invoke
    exit_code = self.exception_handler(ex)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/init.py:130: in exception_handler
    return handle_exception(ex)
           ^^^^^^^^^^^^^^^^^^^^
                                        

ex = ValidationError('Use python version 3.12 as 3.9 has reached end-of-life on 2025-10-31 and is no longer supported. ')
args = (), kwargs = {}

    def handle_main_exception(ex, *args, **kwargs):  # pylint: disable=unused-argument
        if isinstance(ex, CannotOverwriteExistingCassetteException):
            # This exception usually caused by a no match HTTP request. This is a product error
            # that is caused by change of SDK invocation.
            raise ex
    
>       raise CliExecutionError(ex)
E       azure.cli.testsdk.exceptions.CliExecutionError: The CLI throws exception ValidationError during execution and fails the command.

src/azure-cli-testsdk/azure/cli/testsdk/patches.py:35: CliExecutionError

During handling of the above exception, another exception occurred:

self = <azure.cli.command_modules.appservice.tests.latest.test_functionapp_commands.FunctionAppOnLinux testMethod=test_functionapp_on_linux_consumption_python_39>
resource_group = 'clitest.rg000001', storage_account = 'clitest000002'

    @ResourceGroupPreparer(location=LINUX_ASP_LOCATION_FUNCTIONAPP)
    @StorageAccountPreparer()
    def test_functionapp_on_linux_consumption_python_39(self, resource_group, storage_account):
        functionapp = self.create_random_name(
            prefix='functionapp-linux', length=24)
>       self.cmd('functionapp create -g {} -n {} -c {} -s {} --os-type linux --runtime python --functions-version 4 --runtime-version 3.9'
                 .format(resource_group, functionapp, LINUX_ASP_LOCATION_FUNCTIONAPP, storage_account), checks=[
                     JMESPathCheck('name', functionapp)
                 ])

src/azure-cli/azure/cli/command_modules/appservice/tests/latest/test_functionapp_commands.py:2427: 
 
                                       
src/azure-cli-testsdk/azure/cli/testsdk/base.py:177: in cmd
    return execute(self.cli_ctx, command, expect_failure=expect_failure).assert_with_checks(checks)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-testsdk/azure/cli/testsdk/base.py:252: in init
    self.in_process_execute(cli_ctx, command, expect_failure=expect_failure)
src/azure-cli-testsdk/azure/cli/testsdk/base.py:315: in in_process_execute
    raise ex.exception
env/lib/python3.12/site-packages/knack/cli.py:233: in invoke
    cmd_result = self.invocation.execute(args)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:666: in execute
    raise ex
src/azure-cli-core/azure/cli/core/commands/init.py:734: in run_jobs_serially
    results.append(self.run_job(expanded_arg, cmd_copy))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:726: in run_job
    return cmd_copy.exception_handler(ex)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli/azure/cli/command_modules/appservice/commands.py:46: in ex_handler
    raise ex
src/azure-cli-core/azure/cli/core/commands/init.py:703: in run_job
    result = cmd_copy(params)
             ^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:336: in call
    return self.handler(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/command_operation.py:120: in handler
    return op(**command_args)
           ^^^^^^^^^^^^^^^^^^
src/azure-cli/azure/cli/command_modules/appservice/custom.py:6436: in create_functionapp
    matched_runtime = runtime_helper.resolve("dotnet" if not runtime else runtime,
src/azure-cli/azure/cli/command_modules/appservice/custom.py:5855: in resolve
    self.validate_end_of_life_date(
 
 
 
 
 
 
                                 _ 

self = <azure.cli.command_modules.appservice.custom._FunctionAppStackRuntimeHelper object at 0x7f51e8b82d50>
runtime = 'python', version = '3.9', is_linux = True

    def validate_end_of_life_date(self, runtime, version, is_linux):
        from dateutil.relativedelta import relativedelta
        # we would not be able to validate for a custom runtime
        if runtime == 'custom':
            return
    
        today = datetime.datetime.now(datetime.timezone.utc)
        six_months = today + relativedelta(months=+6)
        runtimes = [r for r in self.stacks if r.linux == is_linux and runtime == r.name]
        runtimes.sort(key=lambda r: r.end_of_life_date or
                      datetime.datetime.min.replace(tzinfo=datetime.timezone.utc), reverse=True)
        matched_runtime = next((r for r in runtimes if r.version == version), None)
        if matched_runtime:
            eol = matched_runtime.end_of_life_date
            runtime_deprecation_link = matched_runtime.deprecation_link
            latest_runtime = runtimes[0].version
    
            if eol is None:
                return
    
            if eol < today:
>               raise ValidationError('Use {} version {} as {} has reached end-of-life on {} and is '
                                      'no longer supported. {}'
                                      .format(runtime, latest_runtime, version, eol.date(), runtime_deprecation_link))
E               azure.cli.core.azclierror.ValidationError: Use python version 3.12 as 3.9 has reached end-of-life on 2025-10-31 and is no longer supported.

src/azure-cli/azure/cli/command_modules/appservice/custom.py:5813: ValidationError
azure/cli/command_modules/appservice/tests/latest/test_functionapp_commands.py:2421
❌3.13
Type Test Case Error Message Line
Failed test_functionapp_on_linux_consumption_python_39 self = <azure.cli.testsdk.base.ExecutionResult object at 0x7fc1fb590d70>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7fc1fe6ae5d0>
command = 'functionapp create -g clitest.rg000001 -n functionapp-linux000003 -c ukwest -s clitest000002 --os-type linux --runtime python --functions-version 4 --runtime-version 3.9'
expect_failure = False

    def in_process_execute(self, cli_ctx, command, expect_failure=False):
        from io import StringIO
        from vcr.errors import CannotOverwriteExistingCassetteException
    
        if command.startswith('az '):
            command = command[3:]
    
        stdout_buf = StringIO()
        logging_buf = StringIO()
        try:
            # issue: stderr cannot be redirect in this form, as a result some failure information
            # is lost when command fails.
>           self.exit_code = cli_ctx.invoke(shlex.split(command), out_file=stdout_buf) or 0
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/azure-cli-testsdk/azure/cli/testsdk/base.py:303: 
                                        
env/lib/python3.13/site-packages/knack/cli.py:245: in invoke
    exit_code = self.exception_handler(ex)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/init.py:130: in exception_handler
    return handle_exception(ex)
           ^^^^^^^^^^^^^^^^^^^^
                                        

ex = ValidationError('Use python version 3.12 as 3.9 has reached end-of-life on 2025-10-31 and is no longer supported. ')
args = (), kwargs = {}

    def handle_main_exception(ex, *args, **kwargs):  # pylint: disable=unused-argument
        if isinstance(ex, CannotOverwriteExistingCassetteException):
            # This exception usually caused by a no match HTTP request. This is a product error
            # that is caused by change of SDK invocation.
            raise ex
    
>       raise CliExecutionError(ex)
E       azure.cli.testsdk.exceptions.CliExecutionError: The CLI throws exception ValidationError during execution and fails the command.

src/azure-cli-testsdk/azure/cli/testsdk/patches.py:35: CliExecutionError

During handling of the above exception, another exception occurred:

self = <azure.cli.command_modules.appservice.tests.latest.test_functionapp_commands.FunctionAppOnLinux testMethod=test_functionapp_on_linux_consumption_python_39>
resource_group = 'clitest.rg000001', storage_account = 'clitest000002'

    @ResourceGroupPreparer(location=LINUX_ASP_LOCATION_FUNCTIONAPP)
    @StorageAccountPreparer()
    def test_functionapp_on_linux_consumption_python_39(self, resource_group, storage_account):
        functionapp = self.create_random_name(
            prefix='functionapp-linux', length=24)
>       self.cmd('functionapp create -g {} -n {} -c {} -s {} --os-type linux --runtime python --functions-version 4 --runtime-version 3.9'
                 .format(resource_group, functionapp, LINUX_ASP_LOCATION_FUNCTIONAPP, storage_account), checks=[
                     JMESPathCheck('name', functionapp)
                 ])

src/azure-cli/azure/cli/command_modules/appservice/tests/latest/test_functionapp_commands.py:2427: 
 
                                       
src/azure-cli-testsdk/azure/cli/testsdk/base.py:177: in cmd
    return execute(self.cli_ctx, command, expect_failure=expect_failure).assert_with_checks(checks)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-testsdk/azure/cli/testsdk/base.py:252: in init
    self.in_process_execute(cli_ctx, command, expect_failure=expect_failure)
src/azure-cli-testsdk/azure/cli/testsdk/base.py:315: in in_process_execute
    raise ex.exception
env/lib/python3.13/site-packages/knack/cli.py:233: in invoke
    cmd_result = self.invocation.execute(args)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:666: in execute
    raise ex
src/azure-cli-core/azure/cli/core/commands/init.py:734: in run_jobs_serially
    results.append(self.run_job(expanded_arg, cmd_copy))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:726: in run_job
    return cmd_copy.exception_handler(ex)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli/azure/cli/command_modules/appservice/commands.py:46: in ex_handler
    raise ex
src/azure-cli-core/azure/cli/core/commands/init.py:703: in run_job
    result = cmd_copy(params)
             ^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/init.py:336: in call
    return self.handler(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/commands/command_operation.py:120: in handler
    return op(**command_args)
           ^^^^^^^^^^^^^^^^^^
src/azure-cli/azure/cli/command_modules/appservice/custom.py:6436: in create_functionapp
    matched_runtime = runtime_helper.resolve("dotnet" if not runtime else runtime,
src/azure-cli/azure/cli/command_modules/appservice/custom.py:5855: in resolve
    self.validate_end_of_life_date(
 
 
 
 
 
 
                                 _ 

self = <azure.cli.command_modules.appservice.custom._FunctionAppStackRuntimeHelper object at 0x7fc1fb593770>
runtime = 'python', version = '3.9', is_linux = True

    def validate_end_of_life_date(self, runtime, version, is_linux):
        from dateutil.relativedelta import relativedelta
        # we would not be able to validate for a custom runtime
        if runtime == 'custom':
            return
    
        today = datetime.datetime.now(datetime.timezone.utc)
        six_months = today + relativedelta(months=+6)
        runtimes = [r for r in self.stacks if r.linux == is_linux and runtime == r.name]
        runtimes.sort(key=lambda r: r.end_of_life_date or
                      datetime.datetime.min.replace(tzinfo=datetime.timezone.utc), reverse=True)
        matched_runtime = next((r for r in runtimes if r.version == version), None)
        if matched_runtime:
            eol = matched_runtime.end_of_life_date
            runtime_deprecation_link = matched_runtime.deprecation_link
            latest_runtime = runtimes[0].version
    
            if eol is None:
                return
    
            if eol < today:
>               raise ValidationError('Use {} version {} as {} has reached end-of-life on {} and is '
                                      'no longer supported. {}'
                                      .format(runtime, latest_runtime, version, eol.date(), runtime_deprecation_link))
E               azure.cli.core.azclierror.ValidationError: Use python version 3.12 as 3.9 has reached end-of-life on 2025-10-31 and is no longer supported.

src/azure-cli/azure/cli/command_modules/appservice/custom.py:5813: ValidationError
azure/cli/command_modules/appservice/tests/latest/test_functionapp_commands.py:2421
️✔️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
️✔️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

azure-client-tools-bot-prd bot commented Oct 31, 2025

❌AzureCLI-BreakingChangeTest
❌containerapp
rule cmd_name rule_message suggest_message
1007 - ParaRemove containerapp env premium-ingress add cmd containerapp env premium-ingress add removed parameter max_replicas please add back parameter max_replicas for cmd containerapp env premium-ingress add
1007 - ParaRemove containerapp env premium-ingress add cmd containerapp env premium-ingress add removed parameter min_replicas please add back parameter min_replicas for cmd containerapp env premium-ingress add
1007 - ParaRemove containerapp env premium-ingress update cmd containerapp env premium-ingress update removed parameter max_replicas please add back parameter max_replicas for cmd containerapp env premium-ingress update
1007 - ParaRemove containerapp env premium-ingress update cmd containerapp env premium-ingress update removed parameter min_replicas please add back parameter min_replicas for cmd containerapp env premium-ingress update

Please submit your Breaking Change Pre-announcement ASAP if you haven't already. Please note:

  • Breaking changes can only be merged during the designated breaking change window
  • A pre-announcement must be released at least one month in advance

For more details on how to introduce breaking changes, refer to the documentation: azure-cli/doc/how_to_introduce_breaking_changes.md

@yonzhan
Copy link
Collaborator

yonzhan commented Oct 31, 2025

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

@github-actions
Copy link

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
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 pull request removes unused parameters from the environment premium ingress command functions. The min_replicas and max_replicas parameters were never exposed through the CLI argument parser and therefore could not be used by end users.

  • Removed dead code parameters from add_environment_premium_ingress function
  • Removed dead code parameters from update_environment_premium_ingress function

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

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

Labels

Auto-Assign Auto assign by bot ContainerApp

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants