-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[App Service] az functionapp create
: Add --zone-redundant
parameter to support zone redundant for Functions Flex SKU
#29984
Conversation
️✔️AzureCLI-FullTest
|
|
rule | cmd_name | rule_message | suggest_message |
---|---|---|---|
functionapp create | cmd functionapp create added parameter zone_redundant |
||
functionapp list-flexconsumption-locations | cmd functionapp list-flexconsumption-locations added parameter zone_redundant |
az functionapp create
: Adding zone redundant support for Functions Flex SKU. az functionapp create
: Adding zone redundant support for Functions Flex SKU.
Thank you for your contribution! We will review the pull request and get back to you soon. |
az functionapp create
: Adding zone redundant support for Functions Flex SKU. az functionapp create
: Add zone redundant support for Functions Flex SKU.
/azp run |
Commenter does not have sufficient privileges for PR 29984 in repo Azure/azure-cli |
az functionapp create
: Add zone redundant support for Functions Flex SKU. az functionapp create
: Add zone redundant support for Functions Flex SKU.
az functionapp create
: Add zone redundant support for Functions Flex SKU.az functionapp create
: Add zone redundant support for Functions Flex SKU
if flexconsumption_location is None: | ||
if zone_redundant: | ||
raise ArgumentUsageError( | ||
'--zone-redundant is only valid input for Azure Functions on the Flex Consumption plan. ' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I would reword as "is only valid for the Flex Consumption plan. ' (at least remove the word "input")
as the command this was specified on was already Functions specific right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right. I will change the wording. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@@ -822,6 +826,8 @@ def load_arguments(self, _): | |||
c.argument('deployment_storage_auth_value', options_list=['--deployment-storage-auth-value', '--dsav'], help="The deployment storage account authentication value. For the user-assigned managed identity authentication type, " | |||
"this should be the user assigned identity resource id. For the storage account connection string authentication type, this should be the name of the app setting that will contain the storage account connection " | |||
"string. For the system assigned managed-identity authentication type, this parameter is not applicable and should be left empty.", is_preview=True) | |||
c.argument('zone_redundant', arg_type=get_three_state_flag(), | |||
help='Enable zone redundancy for high availability. Applies to Flex Consumption only.', is_preview=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Applies to Flex Consumption SKU only."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@@ -822,6 +826,8 @@ def load_arguments(self, _): | |||
c.argument('deployment_storage_auth_value', options_list=['--deployment-storage-auth-value', '--dsav'], help="The deployment storage account authentication value. For the user-assigned managed identity authentication type, " | |||
"this should be the user assigned identity resource id. For the storage account connection string authentication type, this should be the name of the app setting that will contain the storage account connection " | |||
"string. For the system assigned managed-identity authentication type, this parameter is not applicable and should be left empty.", is_preview=True) | |||
c.argument('zone_redundant', arg_type=get_three_state_flag(), | |||
help='Enable zone redundancy for high availability. Applies to Flex Consumption only.', is_preview=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's check if we want to mark this as preview
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything related is flex is in preview mode. When we will remove the preview parameters from all Flex related flags, the preview from --zone_redundant will be removed at that time.
zone_redundant_location = next((loc for loc in zone_redundant_locations | ||
if loc['name'].lower() == flexconsumption_location.lower()), None) | ||
if zone_redundant_location is None: | ||
raise ValidationError("Location doesn't support zone redundancy in Flex Consumption. " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: "The specified location "USER_SPECIFIED_LOCATION" doesn't support...."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed it.
@@ -4752,6 +4756,13 @@ def is_exactly_one_true(*args): | |||
return found | |||
|
|||
|
|||
def list_flexconsumption_zone_redundant_locations(cmd): | |||
client = web_client_factory(cmd.cli_ctx) | |||
regions = client.list_geo_regions(sku="FlexConsumption") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens when this API call fails? Does the operation fail or the method return no locations?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
API errors are surfaced to users in cli. The user will be able to see the actual error message from the backend. User can use --debug
flag for further details for the API requests/responses.
please add test for the newly added parameter to verify if it can meet your expectations. |
az functionapp create
: Add zone redundant support for Functions Flex SKUaz functionapp create
: Add --zone-redundant
parameter to support zone redundant for Functions Flex SKU
Added the tests. |
Please fix CI issues |
All the recent PRs are failing because the same failure. Please check and fix the pipeline if possible. It is not related to the PR. |
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
Related command
az functionapp create
Description
Adding the support of --zone-redundant flag in
az functionapp create
for Flex SKU.Testing Guide
az functionapp create -g [rg] -n [name] -s [storage-account-name] --functions-version 4 --runtime python --runtime-version 3.11 --flexconsumption-location eastasia --zone-redundant
History Notes
This 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.