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

[omnibus] Fix snowflake-connector-python dependencies #6666

Merged
merged 37 commits into from
Oct 30, 2020

Conversation

KSerrania
Copy link
Collaborator

@KSerrania KSerrania commented Oct 30, 2020

What does this PR do?

Adds software definitions to build a patched verison of snowflake-connector-python==2.1.3 that is compatible with the other python packages we ship.

Also fixes the pip check step of datadog-agent-integrations-py*, which was being executed before integrations were installed (making it pretty much useless).

Motivation

DataDog/integrations-core#7869 bumped the cryptography dependency to 3.2.1. However, the version of snowflake-connector-python we use (the last one that supports python 2) isn't compatible with cryptography 3.x (setup.py has cryptography < 3.0 in its requirements).

Additional Notes

The connector_python2 and connector_python3 folders in the snowflake-connector-python repo are symlinks to the test folder (see https://github.com/snowflakedb/snowflake-connector-python/tree/v2.1.3). These symlinks caused weird EnvironmentErrors on Windows. That's why we're replacing them will real copies of the test folder.

Small optimisation for later: we could have a snowflake-connector-python definition that does the core work (download + patch), and snowflake-connector-python-py2 and snowflake-connector-python-py3 would use this to install the package.

Note: the pip check needs to be moved as part of this PR, as running it before installing integrations now fails (because of the pre-built snowflake-connector-python).

The snowflake integration should be tested to check that this build change doesn't break it.

Copy link
Contributor

@ChristineTChen ChristineTChen left a comment

Choose a reason for hiding this comment

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

LGTM!

@KSerrania KSerrania merged commit 121efa1 into master Oct 30, 2020
@KSerrania KSerrania deleted the kserrania/snowflake-connector-python-v2 branch October 30, 2020 19:40
KSerrania added a commit that referenced this pull request Oct 31, 2020
Adds a condition to not run the snowflake-connector-python-py2 software definition on MacOS, as it makes notarization fail.
Fixes #6666 to behave as #6391 intended.
@julien-lebot julien-lebot mentioned this pull request Feb 1, 2021
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.

3 participants