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

AttributeError: module 'azure.core.pipeline.policies' has no attribute 'SensitiveHeaderCleanupPolicy' #7689

Open
zazaulgit opened this issue Jun 6, 2024 · 2 comments
Labels
Auto-Assign Auto assign by bot customer-reported Issues that are reported by GitHub users external to the Azure organization. Data Factory 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

@zazaulgit
Copy link

zazaulgit commented Jun 6, 2024

Describe the bug

In linux RHEL 8 using azure cli to retrieve trigger information from datafactory, but it is failling with error
ERROR: module 'azure.core.pipeline.policies' has no attribute 'SensitiveHeaderCleanupPolicy'
Traceback (most recent call last):
File "/usr/lib64/az/lib/python3.6/site-packages/knack/cli.py", line 231, in invoke
cmd_result = self.invocation.execute(args)
File "/usr/lib64/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 663, in execute
raise ex
File "/usr/lib64/az/lib/python3.6/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.6/site-packages/azure/cli/core/commands/init.py", line 697, in _run_job
result = cmd_copy(params)
File "/usr/lib64/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 333, in call
return self.handler(*args, **kwargs)
File "/usr/lib64/az/lib/python3.6/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 "/home/zkhandk2/.azure/cliextensions/datafactory/azext_datafactory/generated/_client_factory.py", line 56, in cf_trigger
return cf_datafactory_cl(cli_ctx).triggers
File "/home/zkhandk2/.azure/cliextensions/datafactory/azext_datafactory/generated/_client_factory.py", line 16, in cf_datafactory_cl
return get_mgmt_service_client(cli_ctx, DataFactoryManagementClient)
File "/usr/lib64/az/lib/python3.6/site-packages/azure/cli/core/commands/client_factory.py", line 74, in get_mgmt_service_client
**kwargs)
File "/usr/lib64/az/lib/python3.6/site-packages/azure/cli/core/commands/client_factory.py", line 230, in _get_mgmt_service_client
client = client_type(cred, subscription_id, **client_kwargs)
File "/home/zkhandk2/.azure/cliextensions/datafactory/azext_datafactory/vendored_sdks/datafactory/_data_factory_management_client.py", line 149, in init
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
AttributeError: module 'azure.core.pipeline.policies' has no attribute 'SensitiveHeaderCleanupPolicy'

command used-
names = az datafactory trigger list --factory-name "xxx" --resource-group "xxx" --query "[?properties.runtimeState=='Started'].name" -o tsv --only-show-errors

Azure cli version
azure-cli 2.38.1 *

core 2.38.1 *
telemetry 1.0.6 *

Extensions:
datafactory 1.0.2

Dependencies:
msal 1.18.0b1
azure-mgmt-resource 21.1.0b1

Python location '/usr/bin/python3.6'
Extensions directory '/home/zkhandk2/.azure/cliextensions'

Python (Linux) 3.6.8 (default, Jan 5 2024, 08:58:17)
[GCC 8.5.0 20210514 (Red Hat 8.5.0-20)]

Legal docs and information: aka.ms/AzureCliLegal

Related command

names = az datafactory trigger list --factory-name "xxx" --resource-group "xxx" --query "[?properties.runtimeState=='Started'].name" -o tsv --only-show-errors

Errors

ERROR: module 'azure.core.pipeline.policies' has no attribute 'SensitiveHeaderCleanupPolicy'
Traceback (most recent call last):
File "/usr/lib64/az/lib/python3.6/site-packages/knack/cli.py", line 231, in invoke
cmd_result = self.invocation.execute(args)
File "/usr/lib64/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 663, in execute
raise ex
File "/usr/lib64/az/lib/python3.6/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.6/site-packages/azure/cli/core/commands/init.py", line 697, in _run_job
result = cmd_copy(params)
File "/usr/lib64/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 333, in call
return self.handler(*args, **kwargs)
File "/usr/lib64/az/lib/python3.6/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 "/home/zkhandk2/.azure/cliextensions/datafactory/azext_datafactory/generated/_client_factory.py", line 56, in cf_trigger
return cf_datafactory_cl(cli_ctx).triggers
File "/home/zkhandk2/.azure/cliextensions/datafactory/azext_datafactory/generated/_client_factory.py", line 16, in cf_datafactory_cl
return get_mgmt_service_client(cli_ctx, DataFactoryManagementClient)
File "/usr/lib64/az/lib/python3.6/site-packages/azure/cli/core/commands/client_factory.py", line 74, in get_mgmt_service_client
**kwargs)
File "/usr/lib64/az/lib/python3.6/site-packages/azure/cli/core/commands/client_factory.py", line 230, in _get_mgmt_service_client
client = client_type(cred, subscription_id, **client_kwargs)
File "/home/zkhandk2/.azure/cliextensions/datafactory/azext_datafactory/vendored_sdks/datafactory/_data_factory_management_client.py", line 149, in init
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
AttributeError: module 'azure.core.pipeline.policies' has no attribute 'SensitiveHeaderCleanupPolicy'

Issue script & Debug output

ERROR: module 'azure.core.pipeline.policies' has no attribute 'SensitiveHeaderCleanupPolicy'
Traceback (most recent call last):
File "/usr/lib64/az/lib/python3.6/site-packages/knack/cli.py", line 231, in invoke
cmd_result = self.invocation.execute(args)
File "/usr/lib64/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 663, in execute
raise ex
File "/usr/lib64/az/lib/python3.6/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.6/site-packages/azure/cli/core/commands/init.py", line 697, in _run_job
result = cmd_copy(params)
File "/usr/lib64/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 333, in call
return self.handler(*args, **kwargs)
File "/usr/lib64/az/lib/python3.6/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 "/home/zkhandk2/.azure/cliextensions/datafactory/azext_datafactory/generated/_client_factory.py", line 56, in cf_trigger
return cf_datafactory_cl(cli_ctx).triggers
File "/home/zkhandk2/.azure/cliextensions/datafactory/azext_datafactory/generated/_client_factory.py", line 16, in cf_datafactory_cl
return get_mgmt_service_client(cli_ctx, DataFactoryManagementClient)
File "/usr/lib64/az/lib/python3.6/site-packages/azure/cli/core/commands/client_factory.py", line 74, in get_mgmt_service_client
**kwargs)
File "/usr/lib64/az/lib/python3.6/site-packages/azure/cli/core/commands/client_factory.py", line 230, in _get_mgmt_service_client
client = client_type(cred, subscription_id, **client_kwargs)
File "/home/zkhandk2/.azure/cliextensions/datafactory/azext_datafactory/vendored_sdks/datafactory/_data_factory_management_client.py", line 149, in init
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
AttributeError: module 'azure.core.pipeline.policies' has no attribute 'SensitiveHeaderCleanupPolicy'

Expected behavior

expected behaviour, it should return trigger names

Environment Summary

azure-cli 2.38.1 *

core 2.38.1 *
telemetry 1.0.6 *

Extensions:
datafactory 1.0.2

Dependencies:
msal 1.18.0b1
azure-mgmt-resource 21.1.0b1

Python location '/usr/bin/python3.6'
Extensions directory '/home/zkhandk2/.azure/cliextensions'

Python (Linux) 3.6.8 (default, Jan 5 2024, 08:58:17)
[GCC 8.5.0 20210514 (Red Hat 8.5.0-20)]

Legal docs and information: aka.ms/AzureCliLegal

Additional context

this error is faced from 6th june 2024

@zazaulgit zazaulgit added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Jun 6, 2024
@yonzhan
Copy link
Collaborator

yonzhan commented Jun 6, 2024

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

@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 Data Factory Service Attention This issue is responsible by Azure service team. labels Jun 6, 2024
@yonzhan yonzhan removed the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Jun 6, 2024
@dnzau
Copy link

dnzau commented Jun 14, 2024

Running: pip install --upgrade azure-core
Fixed the issue on my end

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 customer-reported Issues that are reported by GitHub users external to the Azure organization. Data Factory 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

3 participants