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

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

Open
wants to merge 53 commits into
base: master
Choose a base branch
from

Conversation

sfc-gh-ext-simba-jy
Copy link
Collaborator

Description

Please explain the changes you made here.

Checklist

  • Format code according to the existing code style (run npm run lint:check -- CHANGED_FILES and fix problems in changed code)
  • Create tests which fail without the change (if possible)
  • Make all tests (unit and integration) pass (npm run test:unit and npm run test:integration)
  • Extend the types in index.d.ts file (if necessary)
  • Extend the README / documentation and ensure is properly displayed (if necessary)
  • Provide JIRA issue id (if possible) or GitHub issue id in commit message

Copy link

codecov bot commented Dec 7, 2024

Codecov Report

Attention: Patch coverage is 84.61538% with 8 lines in your changes missing coverage. Please review.

Project coverage is 88.97%. Comparing base (cd3994a) to head (ad5104f).

Files with missing lines Patch % Lines
lib/file_transfer_agent/gcs_util.js 84.61% 4 Missing ⚠️
lib/proxy_util.js 69.23% 4 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

index.d.ts Outdated Show resolved Hide resolved
lib/proxy_util.js Outdated Show resolved Hide resolved
lib/file_transfer_agent/gcs_util.js Outdated Show resolved Hide resolved
lib/file_transfer_agent/gcs_util.js Outdated Show resolved Hide resolved
lib/file_transfer_agent/gcs_util.js Outdated Show resolved Hide resolved
index.d.ts Outdated Show resolved Hide resolved
lib/file_transfer_agent/gcs_util.js Show resolved Hide resolved
lib/file_transfer_agent/gcs_util.js Show resolved Hide resolved
lib/file_transfer_agent/gcs_util.js Show resolved Hide resolved
lib/file_transfer_agent/gcs_util.js Show resolved Hide resolved
lib/proxy_util.js Outdated Show resolved Hide resolved
lib/util.js Outdated Show resolved Hide resolved
lib/file_transfer_agent/gcs_util.js Outdated Show resolved Hide resolved
lib/file_transfer_agent/gcs_util.js Outdated Show resolved Hide resolved
lib/file_transfer_agent/gcs_util.js Outdated Show resolved Hide resolved
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')) {
Copy link
Collaborator

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?

Copy link
Collaborator Author

@sfc-gh-ext-simba-jy sfc-gh-ext-simba-jy Jan 9, 2025

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.

lib/file_transfer_agent/gcs_util.js Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants