Skip to content

Installing latest aks-preview on az CLI 2.54.0 results in ERROR: module 'azure.core.pipeline.policies' has no attribute 'SensitiveHeaderCleanupPolicy' #28649

Description

@wasker

Describe the bug

After installing latest aks-preview extension on v2.54, I'm observing an error when executing az aks get-credentials

2024-03-28 02:59:21.112049: ERROR: The command failed with an unexpected error. Here is the traceback: ERROR: module 'azure.core.pipeline.policies' has no attribute 'SensitiveHeaderCleanupPolicy' Traceback (most recent call last): File "/usr/lib64/az/lib/python3.9/site-packages/knack/cli.py", line 233, in invoke cmd_result = self.invocation.execute(args) File "/usr/lib64/az/lib/python3.9/site-packages/azure/cli/core/commands/init.py", line 663, in execute raise ex File "/usr/lib64/az/lib/python3.9/site-packages/azure/cli/core/commands/init.py", line 726, in _run_jobs_serially results.append(self._run_job(expanded_arg, cmd_copy)) File "/usr/lib64/az/lib/python3.9/site-packages/azure/cli/core/commands/init.py", line 697, in _run_job result = cmd_copy(params) File "/usr/lib64/az/lib/python3.9/site-packages/azure/cli/core/commands/init.py", line 333, in call return self.handler(*args, **kwargs) File "/usr/lib64/az/lib/python3.9/site-packages/azure/cli/core/commands/command_operation.py", line 112, in handler client = self.client_factory(self.cli_ctx, command_args) if self.client_factory else None File "/root/.azure/cliextensions/aks-preview/azext_aks_preview/_client_factory.py", line 31, in cf_managed_clusters return get_container_service_client(cli_ctx).managed_clusters File "/root/.azure/cliextensions/aks-preview/azext_aks_preview/_client_factory.py", line 23, in get_container_service_client return get_mgmt_service_client(cli_ctx, CUSTOM_MGMT_AKS_PREVIEW, subscription_id=subscription_id) File "/usr/lib64/az/lib/python3.9/site-packages/azure/cli/core/commands/client_factory.py", line 83, in get_mgmt_service_client client, _ = _get_mgmt_service_client(cli_ctx, client_type, subscription_id=subscription_id, File "/usr/lib64/az/lib/python3.9/site-packages/azure/cli/core/commands/client_factory.py", line 251, in _get_mgmt_service_client client = client_type(credential, subscription_id, **client_kwargs) File "/root/.azure/cliextensions/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/_container_service_client.py", line 98, in init policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None, AttributeError: module 'azure.core.pipeline.policies' has no attribute 'SensitiveHeaderCleanupPolicy' To check existing issues, please visit: https://github.com/Azure/azure-cli/issues

Related command

az aks get-credentials

Errors

2024-03-28 02:59:21.112049: ERROR: The command failed with an unexpected error. Here is the traceback: ERROR: module 'azure.core.pipeline.policies' has no attribute 'SensitiveHeaderCleanupPolicy' Traceback (most recent call last): File "/usr/lib64/az/lib/python3.9/site-packages/knack/cli.py", line 233, in invoke cmd_result = self.invocation.execute(args) File "/usr/lib64/az/lib/python3.9/site-packages/azure/cli/core/commands/init.py", line 663, in execute raise ex File "/usr/lib64/az/lib/python3.9/site-packages/azure/cli/core/commands/init.py", line 726, in _run_jobs_serially results.append(self._run_job(expanded_arg, cmd_copy)) File "/usr/lib64/az/lib/python3.9/site-packages/azure/cli/core/commands/init.py", line 697, in _run_job result = cmd_copy(params) File "/usr/lib64/az/lib/python3.9/site-packages/azure/cli/core/commands/init.py", line 333, in call return self.handler(*args, **kwargs) File "/usr/lib64/az/lib/python3.9/site-packages/azure/cli/core/commands/command_operation.py", line 112, in handler client = self.client_factory(self.cli_ctx, command_args) if self.client_factory else None File "/root/.azure/cliextensions/aks-preview/azext_aks_preview/_client_factory.py", line 31, in cf_managed_clusters return get_container_service_client(cli_ctx).managed_clusters File "/root/.azure/cliextensions/aks-preview/azext_aks_preview/_client_factory.py", line 23, in get_container_service_client return get_mgmt_service_client(cli_ctx, CUSTOM_MGMT_AKS_PREVIEW, subscription_id=subscription_id) File "/usr/lib64/az/lib/python3.9/site-packages/azure/cli/core/commands/client_factory.py", line 83, in get_mgmt_service_client client, _ = _get_mgmt_service_client(cli_ctx, client_type, subscription_id=subscription_id, File "/usr/lib64/az/lib/python3.9/site-packages/azure/cli/core/commands/client_factory.py", line 251, in _get_mgmt_service_client client = client_type(credential, subscription_id, **client_kwargs) File "/root/.azure/cliextensions/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/_container_service_client.py", line 98, in init policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None, AttributeError: module 'azure.core.pipeline.policies' has no attribute 'SensitiveHeaderCleanupPolicy' To check existing issues, please visit: https://github.com/Azure/azure-cli/issues

Issue script & Debug output

n/a

Expected behavior

No error.

Environment Summary

az CLI v 2.54.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    AKSaz aks/acs/openshiftAuto-AssignAuto assign by botService AttentionThis issue is responsible by Azure service team.act-observability-squadbugThis issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions