az sql server list giving CLIInternalError on arm64/amd64
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 60
Description
**Describe the bug**
`az sql server list` results in:
````
ERROR: CLIInternalError: The command failed with an unexpected error. Here is the traceback:
ERROR: cannot import name 'ImportExistingDatabaseDefinition' from 'azure.mgmt.sql.models' (/usr/lib/python3/dist-packages/azure/mgmt/sql/models/__init__.py)
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
File "/usr/lib/python3/dist-packages/azure/cli/core/commands/__init__.py", line 558, in execute
self.commands_loader.load_arguments(command)
File "/usr/lib/python3/dist-packages/azure/cli/core/__init__.py", line 481, in load_arguments
loader.load_arguments(command) # this adds entries to the argument registries
File "/usr/lib/python3/dist-packages/azure/cli/command_modules/sql/__init__.py", line 27, in load_arguments
from azure.cli.command_modules.sql._params import load_arguments
File "/usr/lib/python3/dist-packages/azure/cli/command_modules/sql/_params.py", line 11, in
from azure.mgmt.sql.models import (
ImportError: cannot import name 'ImportExistingDatabaseDefinition' from 'azure.mgmt.sql.models' (/usr/lib/python3/dist-packages/azure/mgmt/sql/models/__init__.py)
````
**To Reproduce**
ARM64 arch. *EDIT: Also occurs on the AMD64 version of image, so not ARM64 specific.* Dockerfile:
````
FROM debian:bullseye
RUN apt-get update
RUN apt-get install --yes python3 python3-pip
RUN apt install --yes azure-cli
````
I then run a script which does:
1. `az login` with username, password, tenant for a service principal - works
2. `az account set --subscription "my sub here"` - works
3. `az sql server list` - fails as above
**Expected behavior**
List of servers returned, as works with `mcr.microsoft.com/azure-cli:latest` image (on amd64 it works... arm64 build is broken)
**Environment summary**
- arm64 arch, or amd64 arch
- kubernetes
- `debian:bullseye`
- latest `azure-cli` installed via `apt` as above
Contributor guide
Assessment
This issue has not been assessed yet.