-
Notifications
You must be signed in to change notification settings - Fork 133
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
SNOW-1820372: (from 947) when proxy is set in Connection, driver does send traffic through the proxy to S3, but not to Azure blob / GCS bucket (only Snowflake). Works with proxy envvar (GCP) #982
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #982 +/- ##
==========================================
+ Coverage 88.96% 88.97% +0.01%
==========================================
Files 72 72
Lines 6960 6985 +25
==========================================
+ Hits 6192 6215 +23
- Misses 768 770 +2 ☔ View full report in Codecov by Sentry. |
const proxy = ProxyUtil.getProxy(connectionConfig.getProxy(), 'GCS Util'); | ||
|
||
//When http_proxy is enabled, the driver should use Axios for HTTPS requests to avoid relying on HTTP_PROXY in GCS. | ||
if (proxy || Util.getEnvVar('http_proxy')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need the second part in the condition?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is because of the Google Cloud/Storage workflows. As I mentioned in the ticket, Google Cloud/Storage prioritizes the HTTP_PROXY environment variable even if the request is https. The whole condition is to confirm that either HTTPS_PROXY or HTTP_PROXY is enabled. Regarding the second condition, if HTTP_PROXY is enabled, the connector will use Axios instead of Google Cloud/Storage to avoid using HTTP_PROXY, but the proxy value will be null. As a result, the connector will not configure the proxy for the Axios request. If this condition does not exist, the connector will use Google Cloud/Storage with HTTP_PROXY.
Description
Please explain the changes you made here.
Checklist
npm run lint:check -- CHANGED_FILES
and fix problems in changed code)npm run test:unit
andnpm run test:integration
)