Skip to content

Commit

Permalink
[Containerapp] Fix Azure#30053: az containerapp update: Fix polling (
Browse files Browse the repository at this point in the history
  • Loading branch information
Greedygre authored Oct 15, 2024
1 parent a54dce2 commit f80083f
Show file tree
Hide file tree
Showing 80 changed files with 116,607 additions and 77,735 deletions.
16 changes: 11 additions & 5 deletions src/azure-cli/azure/cli/command_modules/containerapp/_clients.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,12 +159,18 @@ def update(cls, cmd, resource_group_name, name, container_app_envelope, no_wait=
if no_wait:
return
elif r.status_code == 202:
operation_url = r.headers.get(HEADER_LOCATION)
response = poll_results(cmd, operation_url)
if response is None:
raise ResourceNotFoundError("Could not find a container app")
operation_url = r.headers.get(HEADER_AZURE_ASYNC_OPERATION)
if operation_url:
poll_status(cmd, operation_url)
r = send_raw_request(cmd.cli_ctx, "GET", request_url)
return r.json()
else:
return response
operation_url = r.headers.get(HEADER_LOCATION)
r = poll_results(cmd, operation_url)
if r is None:
raise ResourceNotFoundError("Could not find a container app")
else:
return r

return r.json()

Expand Down

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.

Original file line number Diff line number Diff line change
Expand Up @@ -2160,7 +2160,7 @@ interactions:
- request:
body: '{"location": "eastus", "tags": null, "properties": {"daprAIInstrumentationKey":
null, "vnetConfiguration": null, "appLogsConfiguration": {"destination": "log-analytics",
"logAnalyticsConfiguration": {"customerId": "f7537ee5-683d-40e8-af12-642df70dc447",
"logAnalyticsConfiguration": {"customerId": "veryFakedCustomerId==",
"sharedKey":"abc123"}},
"customDomainConfiguration": null, "workloadProfiles": [{"workloadProfileType":
"Consumption", "Name": "Consumption"}], "zoneRedundant": false}}'
Expand Down

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.

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.

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.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -2041,7 +2041,7 @@ interactions:
- request:
body: '{"location": "eastus", "tags": null, "properties": {"daprAIInstrumentationKey":
null, "vnetConfiguration": null, "appLogsConfiguration": {"destination": "log-analytics",
"logAnalyticsConfiguration": {"customerId": "b97084bf-1fcc-47fc-8ad6-d5ab05454f9d",
"logAnalyticsConfiguration": {"customerId": "veryFakedCustomerId==",
"sharedKey":"abc123"}},
"customDomainConfiguration": null, "workloadProfiles": [{"workloadProfileType":
"Consumption", "Name": "Consumption"}], "zoneRedundant": false, "peerTrafficConfiguration":
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ interactions:
ParameterSetName:
- -l
User-Agent:
- python/3.10.11 (Windows-10-10.0.22631-SP0) AZURECLI/2.61.0
- python/3.10.11 (Windows-10-10.0.22631-SP0) AZURECLI/2.64.0
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.App/locations/northeurope/availableManagedEnvironmentsWorkloadProfileTypes?api-version=2024-03-01
response:
Expand All @@ -23,15 +23,15 @@ interactions:
api-supported-versions:
- 2022-06-01-preview, 2022-10-01, 2022-11-01-preview, 2023-04-01-preview, 2023-05-01,
2023-05-02-preview, 2023-08-01-preview, 2023-11-02-preview, 2024-02-02-preview,
2024-03-01
2024-03-01, 2024-08-02-preview
cache-control:
- no-cache
content-length:
- '4250'
content-type:
- application/json; charset=utf-8
date:
- Tue, 28 May 2024 08:02:44 GMT
- Mon, 14 Oct 2024 06:40:22 GMT
expires:
- '-1'
pragma:
Expand All @@ -44,8 +44,10 @@ interactions:
- CONFIG_NOCACHE
x-content-type-options:
- nosniff
x-ms-ratelimit-remaining-subscription-global-reads:
- '16499'
x-msedge-ref:
- 'Ref A: A1D38802A8B4495AB655044B5B43456D Ref B: MAA201060515049 Ref C: 2024-05-28T08:02:44Z'
- 'Ref A: C94A271CFD584B4EAD2B79B7B9FFC6FC Ref B: MAA201060514045 Ref C: 2024-10-14T06:40:22Z'
x-powered-by:
- ASP.NET
status:
Expand All @@ -65,7 +67,7 @@ interactions:
ParameterSetName:
- -l
User-Agent:
- python/3.10.11 (Windows-10-10.0.22631-SP0) AZURECLI/2.61.0
- python/3.10.11 (Windows-10-10.0.22631-SP0) AZURECLI/2.64.0
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.App/locations/eastus/availableManagedEnvironmentsWorkloadProfileTypes?api-version=2024-03-01
response:
Expand All @@ -75,15 +77,15 @@ interactions:
api-supported-versions:
- 2022-06-01-preview, 2022-10-01, 2022-11-01-preview, 2023-04-01-preview, 2023-05-01,
2023-05-02-preview, 2023-08-01-preview, 2023-11-02-preview, 2024-02-02-preview,
2024-03-01
2024-03-01, 2024-08-02-preview
cache-control:
- no-cache
content-length:
- '3089'
content-type:
- application/json; charset=utf-8
date:
- Tue, 28 May 2024 08:02:47 GMT
- Mon, 14 Oct 2024 06:40:25 GMT
expires:
- '-1'
pragma:
Expand All @@ -96,8 +98,10 @@ interactions:
- CONFIG_NOCACHE
x-content-type-options:
- nosniff
x-ms-ratelimit-remaining-subscription-global-reads:
- '16499'
x-msedge-ref:
- 'Ref A: 13E0B71B8A254923B175C940E014E57F Ref B: MAA201060515045 Ref C: 2024-05-28T08:02:47Z'
- 'Ref A: 23ABC268A3F8488BA840FB1CEC8F29D6 Ref B: MAA201060515053 Ref C: 2024-10-14T06:40:25Z'
x-powered-by:
- ASP.NET
status:
Expand Down
Loading

0 comments on commit f80083f

Please sign in to comment.