Azure / Azure/azure-cli

Mysterious HTTPSConnectionPool error deploying (too many 500 error responses) when comments are added before first curly brace

Open
#13,518 5 comments 2 reactions 1 assignee Claimed by @zhoxing-ms View on GitHub
act-identity-squad ARM Service Attention
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

### **This is autogenerated. Please review and update as needed.**

## Describe the bug

**Command Name**
`az group deployment create`

**Errors:**
```
Error occurred in request., RetryError: HTTPSConnectionPool(host='management.azure.com', port=443): Max retries exceeded with url: /subscriptions/e5ef2b13-6478-4887-ad57-1aa6b9475040/resourcegroups/deleteme/providers/Microsoft.Resources/deployments/comment-bug?api-version=2019-07-01 (Caused by ResponseError('too many 500 error responses'))
```

## To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

Use this deployment template:
```
// COMMENTS HERE CAUSE MYSTERIOUS ERROR
{
// COMMENTS HERE ARE OKAY
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"resources": [
]
}
```

- `az group deployment create -g {} --template-file {} --handle-extended-json-format`

## Expected Behavior
- Should deploy successfully, or at least give an actionable error message. Took a while to figure out what was going wrong

## Environment Summary
```
macOS-10.14.6-x86_64-i386-64bit
Python 3.8.1
Shell: bash

azure-cli 2.0.80 *

```
## Additional Context

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.