PrefectHQ / prefect

Prefect is a workflow orchestration framework for building resilient data pipelines in Python.
https://prefect.io
Apache License 2.0
17.48k stars 1.64k forks source link

prefect-dbt has undeclared dependencies on google.auth #15336

Closed EmilRex closed 2 months ago

EmilRex commented 2 months ago

Bug summary

Installing prefect-dbt==0.6.0 in a clean environment and executing import prefect_dbt immediately fails with a ModuleNotFoundError error:

 # python -c "import prefect_dbt"

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/emilchristensen/github/tmp/.venv/lib/python3.12/site-packages/prefect_dbt/__init__.py", line 4, in <module>
    from .cli import (  # noqa
  File "/Users/emilchristensen/github/tmp/.venv/lib/python3.12/site-packages/prefect_dbt/cli/__init__.py", line 1, in <module>
    from .credentials import DbtCliProfile  # noqa
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/emilchristensen/github/tmp/.venv/lib/python3.12/site-packages/prefect_dbt/cli/credentials.py", line 8, in <module>
    from prefect_dbt.cli.configs import GlobalConfigs, TargetConfigs
  File "/Users/emilchristensen/github/tmp/.venv/lib/python3.12/site-packages/prefect_dbt/cli/configs/__init__.py", line 9, in <module>
    from .bigquery import BigQueryTargetConfigs  # noqa
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/emilchristensen/github/tmp/.venv/lib/python3.12/site-packages/prefect_dbt/cli/configs/bigquery.py", line 5, in <module>
    from google.auth.transport.requests import Request
ModuleNotFoundError: No module named 'google.auth'

Version info (prefect version output)

Version:             3.0.1
API version:         0.8.4
Python version:      3.12.5
Git commit:          c6b2ffe1
Built:               Fri, Sep 6, 2024 10:05 AM
OS/Arch:             darwin/arm64
Profile:             sandbox
Server type:         cloud
Pydantic version:    2.9.1
Integrations:
  prefect-dbt:       0.6.0
  prefect-shell:     0.3.0

Additional context

Installing prefect-gcp resolves the error, so prefect-gcp likely contains the missing dependency.

seanpwlms commented 2 months ago

I think this might have been addressed by #15334

EmilRex commented 2 months ago

Oh jeez... just barely missed the mark. Thanks @seanpwlms, I'll close!