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 <module>
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:
az login with username, password, tenant for a service principal - works
az account set --subscription "my sub here" - works
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
Describe the bug
az sql server listresults in:To Reproduce
ARM64 arch. EDIT: Also occurs on the AMD64 version of image, so not ARM64 specific. Dockerfile:
I then run a script which does:
az loginwith username, password, tenant for a service principal - worksaz account set --subscription "my sub here"- worksaz sql server list- fails as aboveExpected behavior
List of servers returned, as works with
mcr.microsoft.com/azure-cli:latestimage (on amd64 it works... arm64 build is broken)Environment summary
debian:bullseyeazure-cliinstalled viaaptas above