Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
in-fke opened this issue Dec 17, 2024 · 3 comments
Labels
Auto-Assign Auto assign by bot Connected Kubernetes customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention This issue is responsible by Azure service team.

Comments

@in-fke
Copy link

in-fke commented Dec 17, 2024

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
@yonzhan
Copy link
Collaborator

yonzhan commented Dec 17, 2024

Thank you for opening this issue, we will look into it.

@in-fke
Copy link
Author

in-fke commented Dec 17, 2024

also see Azure/azure-sdk-for-python#34880

@microsoft-github-policy-service microsoft-github-policy-service bot added question The issue doesn't require a change to the product in order to be resolved. Most issues start as that customer-reported Issues that are reported by GitHub users external to the Azure organization. Auto-Assign Auto assign by bot Connected Kubernetes Service Attention This issue is responsible by Azure service team. labels Dec 17, 2024
@in-fke
Copy link
Author

in-fke commented Dec 18, 2024

Upgrade of az has solved it...

Your current Azure CLI version is 2.44.1. Latest version available is 2.67.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Assign Auto assign by bot Connected Kubernetes customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention This issue is responsible by Azure service team.
Projects
None yet
Development

No branches or pull requests

2 participants