[App Service] az appservice plan update/az webapp update : Add elastic scale support #20748
Merged
zhoxing-ms merged 16 commits intoAzure:devfrom Jan 11, 2022
Merged
Conversation
This comment has been minimized.
This comment has been minimized.
Collaborator
|
App Service |
az appservice plan update/az webapp update : add elastic scale support az appservice plan update/az webapp update : Add elastic scale support
wangzelin007
approved these changes
Dec 24, 2021
zhoxing-ms
reviewed
Jan 10, 2022
|
|
||
| with self.argument_context('appservice plan update') as c: | ||
| c.argument('sku', arg_type=sku_arg_type) | ||
| c.argument('elastic_scale', arg_type=get_three_state_flag(), is_preview=True, help='Enable or disable automatic scaling. Set to "true" to enable elastic scale for this plan, or "false" to disable elastic scale for this plan. The SKU must be a Premium V2 SKU (P1V2, P2V2, P3V2) or a Premium V3 SKU (P1V3, P2V3, P3V3)') |
Contributor
There was a problem hiding this comment.
Could we consider using action='store_true' instead of get_three_state_flag() ?
Contributor
Author
There was a problem hiding this comment.
Since this is an update command the parameter needs to be True or False if the user sets a value for the parameter and None if they do not (we don't want elastic scale to be accidentally disabled when someone runs an update command without using --elastic-scale) Does using action='store_true' allow for the argument to be None as well as True/False?
zhoxing-ms
approved these changes
Jan 11, 2022
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Supports elastic scale for Web Apps by adding
--elastic-scaleand--max-elastic-worker-countparameters toaz appservice plan updateas well as--minimum-elastic-instance-countand--prewarmed-instance-countparameters toaz appservice plan updateAlso refactors a utility method related to app service plan SKUs to have a more appropriate name
Testing Guide
azdev test test_elastic_scale_plan test_elastic_scale_plan_max_workersHistory Notes
[App Service]
az appservice plan update: Add--elastic-scaleand--max-elastic-worker-countparameters to support elastic scale[App Service]
az webapp update: Add--minimum-elastic-instance-countand--prewarmed-instance-countparameters to support setting instance countThis checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.