dbt-labs / dbt-rpc

A server that can compile and run queries in the context of a dbt project. Additionally, it provides methods that can be used to list and terminate running processes.
https://docs.getdbt.com/reference/commands/rpc
Apache License 2.0
19 stars 7 forks source link

[CT-733] dbt-rpc serve throws RecursionError: maximum recursion depth exceeded while calling a Python object #85

Closed eugene-nikolaev closed 1 year ago

eugene-nikolaev commented 2 years ago

Hi!

Getting an indefinite logging loop while using dbt-snowflake:1.1.0 with dbt-rpc

My Dockerfile:

FROM ghcr.io/dbt-labs/dbt-snowflake:1.1.0

RUN pip install dbt-rpc==0.1.2

COPY packages.yml .
COPY dbt_project.yml .
RUN dbt deps
COPY analysis ./analysis
COPY data ./data
COPY macros ./macros
COPY models ./models
COPY snapshots ./snapshots
COPY tests ./tests

ENTRYPOINT ["dbt-rpc", "serve"]

That's how I run it:

docker build -t dbt-rpc -f Dockerfile . || { exit 1; }
docker run -e PASSPHRASE=$PASSPHRASE --rm \
    -v $HOME/.dbt:/root/.dbt \
    -v $PWD/logs:/usr/app/dbt/logs \
    -v $PWD/target:/usr/app/dbt/target \
    dbt-rpc "$@" || { exit 1; }

I saw multiple threads on dbt having such an issue on python 3.10 and it seems that dbt 1.1.0 works with python 3.10 (and the image is actually on top of 3.10).

Looks like dbt-rpc 0.1.2 doesn't support python 3.10: https://pypi.org/project/dbt-rpc/

Python :: 3.6
Python :: 3.7
Python :: 3.8
Python :: 3.9

Any hints or workarounds? Maybe I am doing anything wrong?

ChenyuLInx commented 2 years ago

Hey @eugene-nikolaev, thanks for taking the time to open the issue. My sense is that we didn't do the python3.10 support for dbt-rpc. One possible solution right now could be to update your base image to be a python3.9 base image, install dbt-snowflake and dbt-rpc afterwards.

@iknox-fa do you know if we have any work scheduled to make dbt-rpc compatible with python 3.10?

github-actions[bot] commented 1 year ago

This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please remove the stale label or comment on the issue, or it will be closed in 7 days.