snowflake-connector-python
snowflake-connector-python copied to clipboard
SNOW-182372: Added proxies to SnowflakeRestfuls requests session instead of env vars
Added proxies to SnowflakeRestfuls requests session.
What this PR did:
- Changed
set_proxies
method to not set the proxies as system wide environment variables, and renamed itformat_proxies
- Added a
proxies
param toSnowflakeRestful
, and passed the formatted proxy dict from 'SnowflakeConnection.__open_connection()`. - Added the proxy dict to the reqests Session created in
SnowflakeRestful.make_requests_session()
hey @sfc-gh-mkeller,
Is it possible to merge this request? Is there anything I can add to make it better?
Thanks!
Hi @Adaptive-Alon
This looks good to me, please bear with me until I figure out how we should run tests from external PRs. I just gave a little more context over here: https://github.com/snowflakedb/snowflake-connector-python/pull/362#issuecomment-677766530
If you had any idea how we could do this, please let me know!
Also, could you please rebase onto the newest master, I moved .py files from top directory into src/snowflake/connector
, thank you!
Hi @sfc-gh-mkeller, is there any update on when this can get merged and made available?
The setting of the environment variables in set_proxies()
affects other applications running on the server when some use cases may only want proxies specified for just the Snowflake connector. This fix will be super helpful.
Hello @sfc-gh-mkeller . This PR has gone stail with merge conflicts unfortunately now :( .
Snowflake connector is not working in our pipeline because it pollutes our global proxy namespaces, the current implementation is very hacky. It's been several months with this PR not merged - what can we do to help get it merged?
Hey, I rebased the master on my fork and updated my pull request. Unfortunately it seems that tests still fail for users that don't have write permissions to the repo. Maybe someone from the snowflake team can create a similar pull request? or just run the tests for me?
@darkdreamingdan @ChristineTChen To be honest I've resorted to Monkey patching the code and moved on, If you want I can share a snippet of that.
We should be able to revisit this in Q3 and resolve the merge conflicts. Please stay tuned.
is there a plan merging this? would be very appreciated.