Skip to content
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

[Containerapp] Fix #30053: az containerapp update: Fix polling #30078

Merged
merged 3 commits into from
Oct 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
@@ -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()

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
@@ -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}}'

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
@@ -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":

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
@@ -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:
@@ -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:
@@ -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:
@@ -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:
@@ -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:
@@ -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:
Loading