calogica / dbt-expectations

Port(ish) of Great Expectations to dbt test macros
https://calogica.github.io/dbt-expectations/
Apache License 2.0
1.01k stars 123 forks source link

[BUG] CERTIFICATE_VERIFY_FAILED error thrown when using Python 3.10 #239

Closed youngckuw closed 1 year ago

youngckuw commented 1 year ago

Is this a new bug in dbt-expectations?

Current Behavior

Certificate related issue is thrown when using Python 3.10

Expected Behavior

Successful installation of dbt-expectations plug in after executing dbt deps.

Steps To Reproduce

  1. Install Python 3.10 via pyenv 1.1. brew install pyenv 1.2. pyenv install 3.10 1.3. pyenv global 3.10 1.4. export PYENV_ROOT="$HOME/.pyenv" export PATH="$PYENV_ROOT/bin:$PATH" eval "$(pyenv init -)"
  2. Configure packages.yml.
    packages:
    - package: calogica/dbt_expectations
    version: [">=0.8.0", "<0.9.0"]
    # <see https://github.com/calogica/dbt-expectations/releases/latest> for the latest version tag
  3. Run dbt deps

Relevant log output

00:18:35  Running with dbt=1.4.1
00:18:36  Installing calogica/dbt_expectations
00:18:42  Encountered an error:
External connection exception occurred: HTTPSConnectionPool(host='codeload.github.com', port=443): Max retries exceeded with url: /calogica/dbt-expectations/tar.gz/0.8.2 (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:997)')))

Environment

- OS: MacOs Ventura 13.1
- Python: 3.10
- dbt: 1.4.1
- dbt-expectations: 0.8.2
- dbt_date: 0.7.2

Which database adapter are you using with dbt?

n/a

Note: dbt-expectations currently does not support database adapters other than the ones listed below.

Additional Context

I was able to successfully install dbt-expectations by downgrading from Python 3.10 to 3.7 via pyenv

clausherther commented 1 year ago

Hi, thanks for this issue. We don't really do anything special re: Python versions, so this is a probably an issue to raise with dbt-core. Were you able to install any other packages from the dbt package hub with dbt 1.4.1 and Python 3.10?

youngckuw commented 1 year ago

Good point. I ran two other packages (data-mie/dbt_profiler, tnightengale/dbt_meta_testing) with 3.10 and they have the same issue. No issues with 3.7.

I found a couple of tickets re this matter from the dbt-core side. Thanks for the note.

clausherther commented 1 year ago

@youngckuw cool, thanks for confirming. I'll close this.