Error on MSSQL server deployment exits cli with exit code 0, and doesn't stop the pipeline.
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 60
Description
> ### `az feedback` auto-generates most of the information requested below, as of CLI version 2.0.62
**Describe the bug**
I'm using AzureCLi on Azure pipelines.
I have auto-pausing SQL server. When the server is sleeping, azcli tool fails with:
ERROR: {"status":"Failed","error":{"code":"DeploymentFailed","message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.","details":[{"code":"Conflict","message":"{\r\n \"status\": \"Failed\",\r\n \"error\": {\r\n \"code\": \"ResourceDeploymentFailure\",\r\n \"message\": \"The resource operation completed with terminal provisioning state 'Failed'.\",\r\n \"details\": [\r\n {\r\n \"code\": \"ConflictingDatabaseOperation\",\r\n \"message\": \"Operation on server 'mssql-andromeda-test-southcentralus' and database 'dbsync-andromeda-test-southcentralus' is in progress. Please wait a few minutes before trying again.\"\r\n }\r\n ]\r\n }\r\n}"}]}}
However, it exists with successful error code, and doesn't stop the bash pipeline execution.
**To Reproduce**
**Expected behavior**
azure cli should exit with non zero error code, in case if there is an error,
**Environment summary**
Ubuntu-latest in Azure devops.
**Additional context**
az deployment group create \
--name sqldbs-rollout-$(Build.SourceVersion) \
--resource-group data-${{variables.project}}-${{variables.envoriment_name}}-${{variables.location}} \
--template-file $(Build.SourcesDirectory)/az.resources/data/base/sql-databases-base.json \
--parameters ./tmp/sql-databases-${{variables.envoriment_name}}.json
Contributor guide
Assessment
This issue has not been assessed yet.