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

Support proxy settings #8019

Merged
merged 8 commits into from
Nov 13, 2020
Merged

Support proxy settings #8019

merged 8 commits into from
Nov 13, 2020

Conversation

ChristineTChen
Copy link
Contributor

What does this PR do?

This PR introduces a workaround to add proxy support to Snowflake.

Currently, Snowflake python connector supports proxy by setting environment variables HTTP_PROXY/HTTPS_PROXY/NO_PROXY. We want to avoid using this as these configuration settings will affect other services and the integration will not be using proxy settings specified in the Agent.

https://docs.snowflake.com/en/user-guide/python-connector-example.html#using-a-proxy-server

This PR also removes the min_collection config in the code since we don't use this at the check level.

Motivation

There is an upstream PR for this fix https://github.com/snowflakedb/snowflake-connector-python/pull/352.
We can remove the workaround once the fix is available.

Additional Notes

Manually tested with squid proxy

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • PR title must be written as a CHANGELOG entry (see why)
  • Files changes must correspond to the primary purpose of the PR as described in the title (small unrelated changes should have their own PR)
  • PR must have changelog/ and integration/ labels attached

@ChristineTChen ChristineTChen requested review from a team as code owners November 12, 2020 19:52
@ofek ofek changed the title Support proxy settings in Snowflake Support proxy settings Nov 12, 2020
@ofek
Copy link
Contributor

ofek commented Nov 12, 2020

snowflake/datadog_checks/snowflake/check.py Outdated Show resolved Hide resolved
@hithwen
Copy link
Contributor

hithwen commented Nov 13, 2020

LGTM once the log nit is fixed

@FlorianVeaux
Copy link
Member

Why can we perform queries outside of the lock? There’s no proxy once the connection is established?

@ofek
Copy link
Contributor

ofek commented Nov 13, 2020

The method is overridden permanently for the connection created within the lock

Co-authored-by: Ofek Lev <ofekmeister@gmail.com>
Copy link
Contributor

@sarina-dd sarina-dd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants