Azure / azure-cli

Azure Command-Line Interface
MIT License
3.91k stars 2.88k forks source link

azure cli command az webapp create not idempotent any more?? #29295

Open jerryxu1234 opened 3 days ago

jerryxu1234 commented 3 days ago

Describe the bug

Hi, When running this command in a azure devop pipeline (hosted by microsoft), it always fail at the second run. If I delete the web app and run the command, it will succeed. But second run will fail again. The command is:

$output = az webapp create -g ThunderEuwUat -p 'ASP-Thunder-DataLookup-ProductserviceEuwPreP' -n 'ThunderDataApiV2-ThunderEuwUat1' --runtime ''dotnet:7'' --assign-identity [system] --tags 'Business Criticality=yes' 'Data Classification=United Kingdom' 'Family=Core' 'Product=Thunder' 'Owner=Savvas' 'Environment=PreProd' 'Location=westeurope' 'Data Sovereignty=Proprietary' 'Data Transfer Restrictions=Global UK' if (!$?){Throw}

Related command

az webapp create

Errors

2024-06-03T13:56:01.2805576Z WARNING: Webapp 'ThunderDataApiV2-ThunderEuwUat1' already exists. The command will use the existing app's settings. 2024-06-03T13:56:08.6266647Z ERROR: Unable to retrieve details of the existing app 'ThunderDataApiV2-ThunderEuwUat1'. Please check that the app is a part of the current subscription

Issue script & Debug output

2024-06-11T10:23:38.2768966Z Downloading task: AzureCLI (2.239.4) 2024-06-11T10:23:39.0898640Z ##[debug]Task 'AzureCLI' has been downloaded into '024-06-11T10:26:00.6194296Z ##[debug]Agent environment resources - Disk: D:\ Available 12281.00 MB out of 14333.00 MB, Memory: Used 1955.00 MB out of 7167.00 MB, CPU: Usage 2.70% 2024-06-11T10:26:01.5150228Z ERROR: Unable to retrieve details of the existing app 'ThunderDataApiV2-ThunderEuwUat'. Please check that the app is a part of the current subscription 2024-06-11T10:26:02.7868521Z ScriptHalted

Expected behavior

command should succeed even if the site has been created before.

Environment Summary

task: AzureCLI (2.239.4)

Additional context

No response

yonzhan commented 3 days ago

Thank you for opening this issue, we will look into it.

microsoft-github-policy-service[bot] commented 3 days ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @AzureAppServiceCLI, @antcp.

jerryxu1234 commented 14 hours ago

hi, any update?