-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Cannot hide urllib3 warning #32385
Copy link
Copy link
Open
Labels
Azure CLI TeamThe command of the issue is owned by Azure CLI teamThe command of the issue is owned by Azure CLI teamcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues 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 thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Milestone
Metadata
Metadata
Labels
Azure CLI TeamThe command of the issue is owned by Azure CLI teamThe command of the issue is owned by Azure CLI teamcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues 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 thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Describe the bug
Hi everyone,
We are using azure cli with the --only-show-errors flag, but there is a warning from urllib3 which it is not hiding from the output when a local proxy is in use.
I have tried to turn the warning out, passing python the -w flag and via environment variables.
https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings
https://stackoverflow.com/questions/27981545/suppress-insecurerequestwarning-unverified-https-request-is-being-made-in-pytho
This behaviour brakes some scripts, becaues the output of az cli is containing on top of the json output the warning text.
How could we address this issue the best way?
Could that be corrected and configured viathe tool flag?
Related command
All the commands are affected
Errors
Issue script & Debug output
D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\urllib3/connectionpool.py:1097: InsecureRequestWarning: Unverified HTTPS request is being made to host '127.0.0.1'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings
Expected behavior
Warning text is not showing up when using --only-show-errors
Environment Summary
{
"azure-cli": "2.79.0",
"azure-cli-core": "2.79.0",
"azure-cli-telemetry": "1.1.0",
"extensions": {
"aks-preview": "19.0.0b5",
"amg": "2.8.1",
"azure-devops": "1.0.2",
"serviceconnector-passwordless": "3.3.6"
}
}
Additional context
No response