-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[App Service] az functionapp create: Add workload profile support for Centauri apps
#27736
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
Conversation
️✔️AzureCLI-FullTest
|
|
Hi @khkh-ms, |
|
Hi @khkh-ms, |
|
| rule | cmd_name | rule_message | suggest_message |
|---|---|---|---|
| functionapp config container set | cmd functionapp config container set added parameter cpu |
||
| functionapp config container set | cmd functionapp config container set added parameter memory |
||
| functionapp config container set | cmd functionapp config container set added parameter workload_profile_name |
||
| functionapp create | cmd functionapp create added parameter cpu |
||
| functionapp create | cmd functionapp create added parameter memory |
||
| functionapp create | cmd functionapp create added parameter workload_profile_name |
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
please resolve CI issues and conflicts |
# Conflicts: # src/azure-cli/azure/cli/command_modules/appservice/_params.py # src/azure-cli/azure/cli/command_modules/appservice/custom.py
| _validate_cpu_momory_functionapp(cpu, memory) | ||
| update_resource_config(cmd, resource_group_name, name, cpu=cpu, memory=memory, | ||
| workload_profile_name=workload_profile_name) |
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.
Can you add a check here to make sure that the updates are only made if workload_profile_name, cpu or memory are updated?
| raise CLIError(ex) | ||
|
|
||
|
|
||
| def update_resource_config(cmd, resource_group_name, name, workload_profile_name=None, cpu=None, memory=None): |
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.
Also, might be a good idea to rename this function since it is not clear just from the name what exactly would be updated. I would update it to something like update_workload_profile_config
# Conflicts: # src/azure-cli/azure/cli/command_modules/appservice/custom.py
…ted, update indexing
|
LGTM |
…or Centauri apps (Azure#27736) * workload changes * small fix * Added tests. * Addressing the comments. * Updates after changes. * Updated messages * test update. * updated unit tests * Removed the test SDK version * One more change * Few more changes in test. * pylint fixes. * Changes after merge. * Changed regions in the tests. * cred-tests * typo * addressed the comments * Update the recording after some change. * review changes * Test Update and Moved once condition. * lint * pylint again * Addressed the review comments * Updated the recording. * Changed the function name. * Flake8 fix * Updated the recording. * Updated the recording. * Update polling logic for PATCH function app * Rerun workload profile unit test * Consolidate dapr config and workload config updates * Use fake value in recording * Fetch cpu and memory only if resource config is not null * Revert resource config null check, add GET for all centauri apps created, update indexing --------- Co-authored-by: Kirstyn Joy Amperiadis <[email protected]>
Related command
Description
The Consumption + Dedicated plan structure consists of a serverless plan that allows customer’s applications to scale in and out on demand. Applications can scale to zero, and you only pay for running apps.
Fully managed plan that customers can optionally use that provides dedicated, customized hardware to run apps on. Customers can select from general purpose and memory optimized workflow profiles that provide larger amounts of CPU and memory. You pay per node, versus per app, and workload profile can scale in and out as demand changes.
Testing Guide
Get environment names
az containerapp env show --name "<ENVIRONMENT_NAME>" --resource-group "<RESOURCE_GROUP>"Create a function app (note: --memory, --cpu and ---workload-profile-name are new flags)
az functionapp create -g <resource-group> -n <function-app-name> -s <storage-account-name> --environment <container-apps-environment-name> --runtime dotnet-isolated --functions-version 4 --memory 4.0gi --cpu 2.0 --workload-profile-name <work-load-profile-name>Then update the function app
az functionapp config container set --workload-profile-name <workload-profile-name> --memory 4.0gi --cpu 2.0This 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.