Skip to content

az acr check-health command fails with 'NoneType' object has no attribute 'split' #33120

@CodeJourneys

Description

@CodeJourneys

Describe the bug

The az acr check-health command fails with an error. Now that the API version for MGMT_CONTAINERREGISTRY is set to None in the Azure CLI profile, the check causes an AttributeError ('NoneType' object has no attribute 'split') when running check-health against a registry. This bug blocks registry health checking in affected environments.

Related command

az acr check-health

Errors

The command failed with an unexpected error. Here is the traceback:
'NoneType' object has no attribute 'split'
Traceback (most recent call last):
File "..._shared.py", line 335, in init
if 'preview' in api_version_str:
TypeError: argument of type 'NoneType' is not iterable
... (see PR #33117 for full traceback details)

Issue script & Debug output

az acr check-health -n example -y

Expected behavior

The check-health command should succeed whenever run against a supported ACR instance, regardless of profile API version changes.

Environment Summary

azure-cli 2.85.0 or later
Python and OS environment: Windows/Linux/MacOS (any)

See PR #33117 for proposed fix.

Additional context

Proposed fix: PR #33117

The regression occurred after MGMT_CONTAINERREGISTRY API version was set to None in the profile, but the check-health code continued to assume a string version. Removing the outdated API version check resolves the crash.

Metadata

Metadata

Assignees

Labels

Auto-AssignAuto assign by botContainer Registryaz acrService AttentionThis issue is responsible by Azure service team.act-observability-squadapi-version issueThe issues for api-vresionbugThis issue requires a change to an existing behavior in the product in order to be resolved.

Type

No fields configured for Bug.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions