Support proxy per-connection rather than just environment variables#320
Support proxy per-connection rather than just environment variables#320jakewski wants to merge 3 commits intodatabricks:mainfrom
Conversation
|
I would like to add a test for this in client tests - but seems they don't actually run in CI. Any guidance would be much appreciated! #317 |
|
Thanks for this contribution. We have rather poor testing facilities for proxies at present (we need proper CI for this repository -- that's coming soon). Will review and perform some manual testing in the next couple weeks. |
sounds good, appreciate the review! |
Signed-off-by: Levko Kravets <levko.ne@gmail.com>
|
Hi @jakewski! Sorry for not getting back for so long. First of all, thank you for your effort - this indeed is a useful feature to have in this library. The changes you made look good. However, there are two more places that need to be updated as well:
Indeed, we can merge this as is, but in this case the feature will be limited, and eventually other users will complain about it |
|
After this PR was merged: #673 It seems like we can just do |
Problem
I opened this issue: #318. My use case involves using the Databricks SQL connector in a multi-threaded web application where we may not want to set the proxy for all traffic. The current method of using environment variables would not allow that.
Solution
Proxy specification works same way as the Python
requestsmodule - it will default to whatever is set in the environment variable, but it can manually be overridden for a single request / connection if desired.