Azure / deployment-stacks

Contains Deployment Stacks CLI scripts and releases
MIT License
87 stars 6 forks source link

'NoneType' object has no attribute '__name__' #102

Closed oliverlabs closed 1 year ago

oliverlabs commented 1 year ago

Describe the bug Unable to deploy an azure deployment stack when using the latest MSI in Az CLI.

To Reproduce Steps to reproduce the behavior:

Screenshots

stack-issue

Repro Environment Host OS: Insiders Latest Powershell Version: latest

### Tasks
mattias-fjellstrom commented 1 year ago

What version of azure-mgmt-resource do you use? Run az --version. My output is as follows:

azure-cli                2.49.0.post20230602150131

core                     2.49.0.post20230602150131
telemetry                          1.0.8

Extensions:
resource-graph                     2.1.0

Dependencies:
msal                              1.20.0
azure-mgmt-resource               23.0.0

I had a similar issue to what you describe when my version of azure-mgmt-resource was 22.0.0. With 23.0.0 it works.

oliverlabs commented 1 year ago

@mattias-fjellstrom, mine is

azure-cli                         2.49.0

core                              2.49.0
telemetry                          1.0.8

Extensions:
account                            0.2.5
aks-preview                      0.5.141
azure-devops                      0.26.0
azure-firewall                    0.14.7
bastion                            0.2.4
containerapp                      0.3.32
interactive                        0.5.0
resource-graph                     2.1.0
ssh                                1.1.6
virtual-wan                       0.2.17

Dependencies:
msal                              1.22.0
azure-mgmt-resource               23.0.0

The key was to uninstall the previous version of Az CLI prior to installing the MSI from this repo as it installs in parallel. It created a system conflict.

Also, interestingly, the naked MSI (without a forced pip) contains azure-mgmt-resource 23.0.1 but it doesn't work.