Skip to content

[App Service] az appservice plan update/az webapp update : Add elastic scale support #20748

Merged
zhoxing-ms merged 16 commits intoAzure:devfrom
StrawnSC:support_appservice_plans_elastic_scale_12376416
Jan 11, 2022
Merged

[App Service] az appservice plan update/az webapp update : Add elastic scale support #20748
zhoxing-ms merged 16 commits intoAzure:devfrom
StrawnSC:support_appservice_plans_elastic_scale_12376416

Conversation

@StrawnSC
Copy link
Copy Markdown
Contributor

@StrawnSC StrawnSC commented Dec 15, 2021

Description

Supports elastic scale for Web Apps by adding --elastic-scale and --max-elastic-worker-count parameters to az appservice plan update as well as --minimum-elastic-instance-count and --prewarmed-instance-count parameters to az appservice plan update
Also 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_workers

History Notes

[App Service] az appservice plan update: Add --elastic-scale and --max-elastic-worker-count parameters to support elastic scale
[App Service] az webapp update: Add --minimum-elastic-instance-count and --prewarmed-instance-count parameters to support setting instance count


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

@StrawnSC

This comment has been minimized.

@yonzhan yonzhan added this to the Jan 2022 (2022-02-01) milestone Dec 23, 2021
@yonzhan
Copy link
Copy Markdown
Collaborator

yonzhan commented Dec 23, 2021

App Service

@wangzelin007 wangzelin007 changed the title [App Service] az appservice plan update/az webapp update : add elastic scale support [App Service] az appservice plan update/az webapp update : Add elastic scale support Dec 23, 2021
@StrawnSC StrawnSC removed this from the Jan 2022 (2022-02-01) milestone Dec 27, 2021
@StrawnSC StrawnSC added this to the Jan 2022 (2022-02-08) milestone Jan 3, 2022
@StrawnSC StrawnSC marked this pull request as ready for review January 3, 2022 18:14

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)')
Copy link
Copy Markdown
Contributor

@zhoxing-ms zhoxing-ms Jan 10, 2022

Choose a reason for hiding this comment

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

Could we consider using action='store_true' instead of get_three_state_flag() ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Got it, thanks~

@zhoxing-ms zhoxing-ms merged commit 6c1b085 into Azure:dev Jan 11, 2022
@StrawnSC StrawnSC deleted the support_appservice_plans_elastic_scale_12376416 branch February 11, 2022 18:16
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.

4 participants