Skip to content

az connectedk8s connect fails with AttributeError: module 'azure.core.pipeline.policies' has no attribute 'SensitiveHeaderCleanupPolicy' #8376

Open
@in-fke

Description

Describe the bug

Command Name
az connectedk8s connect Extension Name: connectedk8s. Version: 1.9.2.

Errors:

The command failed with an unexpected error. Here is the traceback:
module 'azure.core.pipeline.policies' has no attribute 'SensitiveHeaderCleanupPolicy'
Traceback (most recent call last):
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 233, in invoke
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 663, in execute
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 726, in _run_jobs_serially
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 697, in _run_job
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 333, in __call__
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 121, in handler
  File "C:\Users\fnke\.azure\cliextensions\connectedk8s\azext_connectedk8s\custom.py", line 146, in create_connectedk8s
    client = cf_connected_cluster_prev_2024_07_01(cmd.cli_ctx, None)
  File "C:\Users\fnke\.azure\cliextensions\connectedk8s\azext_connectedk8s\_client_factory.py", line 79, in cf_connected_cluster_prev_2024_07_01
    return cf_connectedk8s_prev_2024_07_01(cli_ctx).connected_cluster
  File "C:\Users\fnke\.azure\cliextensions\connectedk8s\azext_connectedk8s\_client_factory.py", line 75, in cf_connectedk8s_prev_2024_07_01
    return get_mgmt_service_client(cli_ctx, ConnectedKubernetesClient)
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/client_factory.py", line 83, in get_mgmt_service_client
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/client_factory.py", line 251, in _get_mgmt_service_client
  File "C:\Users\fnke\.azure\cliextensions\connectedk8s\azext_connectedk8s\vendored_sdks\preview_2024_07_01\_connected_kubernetes_client.py", line 72, in __init__
    policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
AttributeError: module 'azure.core.pipeline.policies' has no attribute 'SensitiveHeaderCleanupPolicy'

To Reproduce:

Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

  • Put any pre-requisite steps here...
  • az connectedk8s connect --name {} --resource-group {} --subscription {} --enable-oidc-issuer --enable-workload-identity --disable-auto-upgrade

Expected Behavior

Environment Summary

Windows-10-10.0.19045-SP0
Python 3.10.8
Installer: 

azure-cli 2.44.1 *

Extensions:
azure-devops 0.25.0
azure-iot 0.18.3
connectedk8s 1.9.2

Dependencies:
msal 1.20.0
azure-mgmt-resource 21.1.0b1

Additional Context

It's actually a WSL2 VM Ubuntu

Linux GFT-2s3Ynr7uCd3 5.15.167.4-microsoft-standard-WSL2 #1 SMP Tue Nov 5 00:21:55 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Auto-AssignAuto assign by botConnected KubernetesService AttentionThis issue is responsible by Azure service team.customer-reportedIssues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions