-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
: Create consumption plan when creating the function app
#30612
base: dev
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
interactions: | ||
- request: | ||
body: '{"location": "southcentralus", "sku": {"name": "Y1", "tier": "Dynamic"}, | ||
"properties": {"perSiteScaling": false, "reserved": true, "isXenon": false, | ||
"zoneRedundant": false}}' | ||
headers: | ||
Accept: | ||
- application/json | ||
Accept-Encoding: | ||
- gzip, deflate | ||
CommandName: | ||
- functionapp plan create | ||
Connection: | ||
- keep-alive | ||
Content-Length: | ||
- '173' | ||
Content-Type: | ||
- application/json | ||
ParameterSetName: | ||
- -g -n --sku --is-linux --location | ||
User-Agent: | ||
- AZURECLI/2.68.0 azsdk-python-core/1.31.0 Python/3.11.9 (Windows-10-10.0.26100-SP0) | ||
method: PUT | ||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Web/serverfarms/functionappplan000003?api-version=2023-01-01 | ||
response: | ||
body: | ||
string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Web/serverfarms/functionappplan000003","name":"functionappplan000003","type":"Microsoft.Web/serverfarms","kind":"functionapp","location":"southcentralus","properties":{"serverFarmId":85213,"name":"functionappplan000003","sku":{"name":"Y1","tier":"Dynamic","size":"Y1","family":"Y","capacity":0},"workerSize":"Default","workerSizeId":0,"workerTierName":null,"numberOfWorkers":0,"currentWorkerSize":"Default","currentWorkerSizeId":0,"currentNumberOfWorkers":0,"status":"Ready","webSpace":"clitest.rg000001-SouthCentralUSwebspace-Linux","subscription":"dbf67cc6-6c57-44b8-97fc-4356f0d555b3","adminSiteName":null,"hostingEnvironment":null,"hostingEnvironmentProfile":null,"maximumNumberOfWorkers":0,"planName":"VirtualDedicatedPlan","adminRuntimeSiteName":null,"computeMode":"Dynamic","siteMode":null,"geoRegion":"South | ||
Central US","perSiteScaling":false,"elasticScaleEnabled":false,"maximumElasticWorkerCount":1,"numberOfSites":0,"hostingEnvironmentId":null,"isSpot":false,"spotExpirationTime":null,"freeOfferExpirationTime":null,"tags":null,"kind":"functionapp","resourceGroup":"clitest.rg000001","reserved":true,"isXenon":false,"hyperV":false,"mdmId":"waws-prod-sn1-147_85213","targetWorkerCount":0,"targetWorkerSizeId":0,"provisioningState":"Succeeded","webSiteId":null,"existingServerFarmIds":null,"kubeEnvironmentProfile":null,"zoneRedundant":false,"migrateToVMSS":null,"vnetConnectionsUsed":null,"vnetConnectionsMax":null,"createdTime":"2025-01-23T16:22:08.1633333"},"sku":{"name":"Y1","tier":"Dynamic","size":"Y1","family":"Y","capacity":0}}' | ||
headers: | ||
cache-control: | ||
- no-cache | ||
content-length: | ||
- '1656' | ||
content-type: | ||
- application/json | ||
date: | ||
- Thu, 23 Jan 2025 16:22:08 GMT | ||
expires: | ||
- '-1' | ||
pragma: | ||
- no-cache | ||
strict-transport-security: | ||
- max-age=31536000; includeSubDomains | ||
x-aspnet-version: | ||
- 4.0.30319 | ||
x-cache: | ||
- CONFIG_NOCACHE | ||
x-content-type-options: | ||
- nosniff | ||
x-ms-ratelimit-remaining-subscription-global-writes: | ||
- '11999' | ||
x-ms-ratelimit-remaining-subscription-writes: | ||
- '799' | ||
x-msedge-ref: | ||
- 'Ref A: 3B28ED47C86D4658B4A097E140EE1DCB Ref B: CH1AA2020620039 Ref C: 2025-01-23T16:22:03Z' | ||
x-powered-by: | ||
- ASP.NET | ||
status: | ||
code: 200 | ||
message: OK | ||
- request: | ||
body: null | ||
headers: | ||
Accept: | ||
- application/json | ||
Accept-Encoding: | ||
- gzip, deflate | ||
CommandName: | ||
- functionapp plan show | ||
Connection: | ||
- keep-alive | ||
ParameterSetName: | ||
- -g -n | ||
User-Agent: | ||
- AZURECLI/2.68.0 azsdk-python-core/1.31.0 Python/3.11.9 (Windows-10-10.0.26100-SP0) | ||
method: GET | ||
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Web/serverfarms/functionappplan000003?api-version=2023-01-01 | ||
response: | ||
body: | ||
string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Web/serverfarms/functionappplan000003","name":"functionappplan000003","type":"Microsoft.Web/serverfarms","kind":"functionapp","location":"South | ||
Central US","properties":{"serverFarmId":85213,"name":"functionappplan000003","workerSize":"Default","workerSizeId":0,"workerTierName":null,"numberOfWorkers":0,"currentWorkerSize":"Default","currentWorkerSizeId":0,"currentNumberOfWorkers":0,"status":"Ready","webSpace":"clitest.rg000001-SouthCentralUSwebspace-Linux","subscription":"dbf67cc6-6c57-44b8-97fc-4356f0d555b3","adminSiteName":null,"hostingEnvironment":null,"hostingEnvironmentProfile":null,"maximumNumberOfWorkers":0,"planName":"VirtualDedicatedPlan","adminRuntimeSiteName":null,"computeMode":"Dynamic","siteMode":null,"geoRegion":"South | ||
Central US","perSiteScaling":false,"elasticScaleEnabled":false,"maximumElasticWorkerCount":1,"numberOfSites":0,"hostingEnvironmentId":null,"isSpot":false,"spotExpirationTime":null,"freeOfferExpirationTime":null,"tags":null,"kind":"functionapp","resourceGroup":"clitest.rg000001","reserved":true,"isXenon":false,"hyperV":false,"mdmId":"waws-prod-sn1-147_85213","targetWorkerCount":0,"targetWorkerSizeId":0,"provisioningState":"Succeeded","webSiteId":null,"existingServerFarmIds":null,"kubeEnvironmentProfile":null,"zoneRedundant":false,"migrateToVMSS":null,"vnetConnectionsUsed":0,"vnetConnectionsMax":2,"createdTime":"2025-01-23T16:22:08.1633333"},"sku":{"name":"Y1","tier":"Dynamic","size":"Y1","family":"Y","capacity":0}}' | ||
headers: | ||
cache-control: | ||
- no-cache | ||
content-length: | ||
- '1577' | ||
content-type: | ||
- application/json | ||
date: | ||
- Thu, 23 Jan 2025 16:22:09 GMT | ||
expires: | ||
- '-1' | ||
pragma: | ||
- no-cache | ||
strict-transport-security: | ||
- max-age=31536000; includeSubDomains | ||
x-aspnet-version: | ||
- 4.0.30319 | ||
x-cache: | ||
- CONFIG_NOCACHE | ||
x-content-type-options: | ||
- nosniff | ||
x-ms-ratelimit-remaining-subscription-global-reads: | ||
- '16499' | ||
x-msedge-ref: | ||
- 'Ref A: 60F481660DF0435EAC0EBB276B584A6F Ref B: CH1AA2020610033 Ref C: 2025-01-23T16:22:08Z' | ||
x-powered-by: | ||
- ASP.NET | ||
status: | ||
code: 200 | ||
message: OK | ||
version: 1 |
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.
I think this is the reason why the recording tests failed. A new random plan name will be generated when each time this function is run. Thus, when tests are run under recording mode, the plan name is generated again and different from what in the recoding file.
azure-cli/src/azure-cli/azure/cli/command_modules/appservice/custom.py
Lines 5394 to 5398 in 900d762
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.
Hi @yanzhudd We actually do intend to create a new plan resource with a new name on behalf of the customer. Does this mean we should just make the tests run live? Or what would you require for this PR to be merged?
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.
yes, please mark the related tests as live only, and remove the corresponding recording files as well.
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! Thank you @yanzhudd. The PR is ready to be merged. Can you please review/merge it?