-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Description
Describe the bug
Running the az iot ops check command results in a KeyError: 'serviceName'. The command fails during the evaluation of broker listeners, indicating that the CLI extension expects a serviceName key in the listener spec, which is missing in the actual data.
Related command
az iot ops check --debug
Errors
KeyError: 'serviceName'
File ".../check/mq.py", line 158, in evaluate_broker_listeners
listener_spec_service_name: str = listener_spec["serviceName"]
Issue script & Debug output
az iot ops check --debug
Expected behavior
The command should handle missing or optional fields gracefully and not crash due to missing keys in the resource spec.
Azure CLI version: az version output:
{
"azure-cli": "2.61.0",
"azure-iot-ops": "1.5.0",
...
}
Environment Summary
Azure CLI Version:
azure-cli 2.73.0
core 2.73.0
telemetry 1.1.0
Extensions:
azure-iot-ops 1.5.0
connectedk8s 1.10.7
Dependencies:
msal 1.32.3
azure-mgmt-resource 23.3.0
Python (Linux) 3.12.8 (main, May 13 2025, 11:04:53) [GCC 13.3.0]
Azure IoT Ops Extension Version: 1.5.0
Operating System: Ubuntu 24.04 tls (running on Azure VM vm3)
Kubernetes Cluster: k3s (lightweight Kubernetes distribution)
Namespace: azure-iot-operations
Cluster Node: vm3
Broker Version: 1.1.7