Skip to content

Conversation

@Juliehzl
Copy link
Contributor

This reverts commit 1dca2de.


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

Related command

General Guidelines

  • Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
  • Have you run python scripts/ci/test_index.py -q locally? (pip install wheel==0.30.0 required)
  • My extension version conforms to the Extension version schema

For new extensions:

About Extension Publish

There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update src/index.json automatically.
You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify src/index.json.

Copilot AI review requested due to automatic review settings July 30, 2025 06:00
@Juliehzl Juliehzl requested a review from howang-ms as a code owner July 30, 2025 06:00
@azure-client-tools-bot-prd
Copy link

Hi @Juliehzl,
Please write the description of changes which can be perceived by customers into HISTORY.rst.
If you want to release a new extension version, please update the version in setup.py as well.

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

azure-client-tools-bot-prd bot commented Jul 30, 2025

❌Azure CLI Extensions Breaking Change Test
❌containerapp
rule cmd_name rule_message suggest_message
1006 - ParaAdd containerapp env premium-ingress add cmd containerapp env premium-ingress add added parameter max_replicas please remove parameter max_replicas for cmd containerapp env premium-ingress add
1006 - ParaAdd containerapp env premium-ingress add cmd containerapp env premium-ingress add added parameter min_replicas please remove parameter min_replicas for cmd containerapp env premium-ingress add
⚠️ 1006 - ParaAdd containerapp env premium-ingress update cmd containerapp env premium-ingress update added parameter max_replicas
⚠️ 1006 - ParaAdd containerapp env premium-ingress update cmd containerapp env premium-ingress update added parameter min_replicas

@yonzhan
Copy link
Collaborator

yonzhan commented Jul 30, 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 PR reverts a previous commit that removed ingress scale settings (--min-replicas and --max-replicas parameters) from the az containerapp env premium-ingress commands. The revert restores the ability to configure replica scaling for premium ingress configurations.

  • Restored --min-replicas and --max-replicas parameters to premium ingress commands
  • Updated function signatures to accept the scaling parameters
  • Modified tests to include scale configuration checks

Reviewed Changes

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

Show a summary per file
File Description
src/containerapp/azext_containerapp/_params.py Re-added parameter definitions for min-replicas and max-replicas
src/containerapp/azext_containerapp/custom.py Restored scale configuration logic in add/update functions
src/containerapp/azext_containerapp/tests/latest/test_containerapp_commands.py Updated tests to include scale parameter validation
src/containerapp/azext_containerapp/_help.py Updated help examples to include scale parameters
src/containerapp/HISTORY.rst Removed the changelog entry about parameter removal



def add_environment_premium_ingress(cmd, name, resource_group_name, workload_profile_name, termination_grace_period=None, request_idle_timeout=None, header_count_limit=None, no_wait=False):
def add_environment_premium_ingress(cmd, name, resource_group_name, workload_profile_name, min_replicas, max_replicas, termination_grace_period=None, request_idle_timeout=None, header_count_limit=None, no_wait=False):
Copy link

Copilot AI Jul 30, 2025

Choose a reason for hiding this comment

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

The min_replicas and max_replicas parameters are required (no default values) but the help text in _params.py suggests defaults ("Default 2" and "Default 10"). This inconsistency could confuse users about whether these parameters are required or optional.

Copilot uses AI. Check for mistakes.
if workload_profile_name is not None:
ingress_config["workloadProfileName"] = workload_profile_name
if min_replicas is not None:
ingress_config["scale"] = scale
Copy link

Copilot AI Jul 30, 2025

Choose a reason for hiding this comment

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

The scale dictionary is assigned to ingress_config multiple times (lines 3893 and 3896). This creates duplicate code that could be consolidated by checking if either min_replicas or max_replicas is not None before creating the scale object once.

Copilot uses AI. Check for mistakes.
@Juliehzl Juliehzl requested review from Tratcher and removed request for howang-ms July 30, 2025 06:01
@github-actions
Copy link

CodeGen Tools Feedback Collection

Thank you for using our CodeGen tool. We value your feedback, and we would like to know how we can improve our product. Please take a few minutes to fill our codegen survey

@github-actions
Copy link

Hi @Juliehzl

Release Suggestions

Module: containerapp

  • Update VERSION to 1.2.0b3 in src/containerapp/setup.py

Notes

howang-ms
howang-ms previously approved these changes Jul 30, 2025
evelyn-ys
evelyn-ys previously approved these changes Jul 30, 2025
zhoxing-ms
zhoxing-ms previously approved these changes Jul 30, 2025
@Juliehzl Juliehzl dismissed stale reviews from zhoxing-ms, evelyn-ys, and howang-ms via f63ead1 July 30, 2025 07:21
@evelyn-ys evelyn-ys merged commit 33765bf into Azure:main Jul 30, 2025
23 of 24 checks passed
@Tratcher Tratcher mentioned this pull request Jul 30, 2025
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants