[App Service] az functionapp plan update: Add zone redundant update support for Flex#31415
Conversation
️✔️AzureCLI-FullTest
|
|
Hi @khkh-ms, |
️✔️AzureCLI-BreakingChangeTest
|
|
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). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
0550ae6 to
8018eec
Compare
| def update_flex_app_service_plan(instance): | ||
| instance.target_worker_count=None | ||
| instance.target_worker_size=None | ||
| instance.is_xenon=None | ||
| instance.hyper_v=None | ||
| instance.per_site_scaling=None | ||
| instance.maximum_elastic_worker_count=None | ||
| instance.elastic_scale_enabled=None | ||
| instance.is_spot=None | ||
| instance.target_worker_size_id=None | ||
| instance.sku.capacity=None | ||
| return instance |
There was a problem hiding this comment.
Should we also set these when we create the flex plan?
There was a problem hiding this comment.
The backend doesn't expect the full plan object at the moment. During the creation, we don't send the full plan object, only the selected properties. This change ensures that we also only send the selected properties of the object during the update. This only applies to Flex Plan.
| number_of_workers = validate_range_of_int_flag('--number-of-workers / --min-instances', | ||
| number_of_workers, min_val=0, max_val=20) | ||
| if is_plan_flex(cmd, instance): | ||
| return update_flex_app_service_plan(instance) |
There was a problem hiding this comment.
The instance here is the requested ServerFarm information from the user right?
There was a problem hiding this comment.
Yes, it is done in a separate method. Command ensures that this method get the fully populated object (logic is in command definition). The job of this method is just to modify the object.
Related command
az functionapp plan update
Description
Updating
az functionapp plan updateto add support to update zone redundant for Flex apps.Testing Guide
History Notes
[Component Name 1] BREAKING CHANGE:
az command a: Make some customer-facing breaking change[Component Name 2]
az command b: Add some customer-facing featureThis 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.