Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

{AzContainerApp} fixes Azure/azure-cli-extensions#5067 #5085

Merged
merged 5 commits into from
Jul 11, 2022

Conversation

navba-MSFT
Copy link
Contributor

@navba-MSFT navba-MSFT commented Jul 6, 2022

az containerapp update -n ContainerAppName -g ResourceGroup --min-replicas 0 --max-replicas 0 finishes without throwing any error, however scaling configuration is not updated as max replicas cannot be zero.

This PR should include a fix to validate the --max-replicas field while the value is sent as Zero and raise CLIError

fixes #5067

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?

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.
The precondition is to put your code inside this repository and upgrade the version in the pull request but do not modify src/index.json.

az containerapp update -n ContainerAppName -g ResourceGroup --min-replicas 0 --max-replicas 0 finishes without throwing any error, however scaling configuration is not updated as max replicas cannot be zero.

This PR should include a fix to validate the --max-replicas field while the value is sent as Zero and raise CLIError
@ghost ghost requested a review from yonzhan July 6, 2022 05:56
@ghost ghost added the Auto-Assign Auto assign by bot label Jul 6, 2022
@ghost ghost requested a review from wangzelin007 July 6, 2022 05:56
@ghost ghost assigned zhoxing-ms Jul 6, 2022
@ghost ghost added this to the Jul 2022 (2022-08-02) milestone Jul 6, 2022
@ghost ghost added the ContainerApp label Jul 6, 2022
@ghost ghost requested review from zhoxing-ms and jsntcy July 6, 2022 05:56
@yonzhan
Copy link
Collaborator

yonzhan commented Jul 6, 2022

AzContainerApp

@zhoxing-ms
Copy link
Contributor

Running flake8 on extensions...
/home/vsts/work/1/s/src/containerapp/azext_containerapp/custom.py:511:1: W293 blank line contains whitespace
1 W293 blank line contains whitespace

Please solve the flake8 issue

used the specific error type ArgumentUsageError instead of CLIError

az containerapp update -n ContainerAppName -g ResourceGroup --min-replicas 0 --max-replicas 0 finishes without throwing any error, however scaling configuration is not updated as max replicas cannot be zero.

This PR should include a fix to validate the --max-replicas field while the value is sent as Zero and raise CLIError

fixes Azure#5067
navba-MSFT and others added 2 commits July 11, 2022 12:26
updated

Co-authored-by: Xing Zhou <Zhou.Xing@microsoft.com>
az containerapp update -n ContainerAppName -g ResourceGroup --min-replicas 0 --max-replicas 0 finishes without throwing any error, however scaling configuration is not updated as max replicas cannot be zero.

This PR should include a fix to validate the --max-replicas field while the value is sent as Zero and raise CLIError

fixes Azure#5067
@zhoxing-ms zhoxing-ms merged commit b02803b into Azure:main Jul 11, 2022
@navba-MSFT navba-MSFT added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Aug 17, 2022
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 bug This issue requires a change to an existing behavior in the product in order to be resolved. ContainerApp
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[containerapp] az containerapp update with --max-replicas 0 returns no error
3 participants