Azure / Azure/azure-cli-extensions

Cloud shell "az datamodel create" issue

Open
#2,727 1 comment 0 reactions 0 assignees View on GitHub
Service Attention
Dominant language
Python
Stars
454
Forks
1.7k
Avg merge
2d 19h
Merged PRs (30d)
64

Description

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

## Describe the bug
Creating datamodel from Cloud Shell (bash)

**Command Name**
`az datamodel create
Extension Name: aidls. Version: 0.1.20201025.572.`

**Errors:**
```
'Response' object has no attribute 'status'
Traceback (most recent call last):
azure/cli/core/adal_authentication.py, ln 103, in set_token
super(MSIAuthenticationWrapper, self).set_token()
python3.6/site-packages/msrestazure/azure_active_directory.py, ln 598, in set_token
self.scheme, _, self.token = get_msi_token(self.resource, self.port, self.msi_conf)
python3.6/site-packages/msrestazure/azure_active_directory.py, ln 486, in get_msi_token
result.raise_for_status()
...

azure/cli/core/adal_authentication.py, ln 114, in set_token
.format(err.response.status, err.response.reason))
AttributeError: 'Response' object has no attribute 'status'
```

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

- `az datamodel create --name {} --model-directives {} -g {} --synapse-workspace {}`

## Expected Behavior
datamodel is created

## Environment Summary
```
Linux-4.15.0-1098-azure-x86_64-with-debian-stretch-sid (Cloud Shell)
Python 3.6.10
Installer: DEB

azure-cli 2.14.0 *

Extensions:
aidls 0.1.20201025.572
ai-examples 0.2.4

```
## Additional Context

Contributor guide

Open the contributing guide

Research direction

Start by reproducing `az datamodel create` in the Cloud Shell environment described, then read `azure/cli/core/adal_authentication.py` around `set_token` and the traceback path in `msrestazure/azure_active_directory.py`. Determine why the MSI authentication error exposes no `status`, and confirm that the command creates the datamodel without the reported AttributeError.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, bash, python
Domain
cli, cloud
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.