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

[CT-1528] [Regression] Python error while running dbt deps command when using docker image ghcr.io/dbt-labs/dbt-postgres:1.2.latest #6282

Closed
2 tasks done
joelchartier opened this issue Nov 17, 2022 · 3 comments
Labels
bug Something isn't working duplicate This issue or pull request already exists jira regression

Comments

@joelchartier
Copy link

Is this a regression in a recent version of dbt-core?

  • I believe this is a regression in dbt-core functionality
  • I have searched the existing issues, and I could not find an existing issue for this regression

Current Behavior

When we run command dbt deps using Docker image ghcr.io/dbt-labs/dbt-postgres:1.2.latest (which is 1.2.3, sha256:71d6e7962bad1cad0aa0696a62c2095de089aa197f2bdcb7bd1b61883643a620), we have a Python error

Expected/Previous Behavior

We expect dependencies to be installed when running dbt deps

Steps To Reproduce

  1. In docker image ghcr.io/dbt-labs/dbt-postgres:1.2.latest

  2. With this config packages.yaml

packages:
  - package: dbt-labs/metrics
    version: 0.3.2
  1. Run dbt deps

  2. See error NotImplementedError from Python3.11

Relevant log output

$ dbt deps
Traceback (most recent call last):
  File "/usr/local/bin/dbt", line 5, in <module>
    from dbt.main import main
  File "/usr/local/lib/python3.11/site-packages/dbt/main.py", line 2, in <module>
    from dbt.logger import log_cache_events, log_manager
  File "/usr/local/lib/python3.11/site-packages/dbt/logger.py", line 16, in <module>
    from dbt.dataclass_schema import dbtClassMixin
  File "/usr/local/lib/python3.11/site-packages/dbt/dataclass_schema.py", line 15, in <module>
    from mashumaro import DataClassDictMixin
  File "/usr/local/lib/python3.11/site-packages/mashumaro/__init__.py", line 4, in <module>
    from mashumaro.serializer.json import DataClassJSONMixin
  File "/usr/local/lib/python3.11/site-packages/mashumaro/serializer/json.py", line 28, in <module>
    class DataClassJSONMixin(DataClassDictMixin):
  File "/usr/local/lib/python3.11/site-packages/mashumaro/serializer/base/dict.py", line 16, in __init_subclass__
    builder.add_from_dict()
  File "/usr/local/lib/python3.11/site-packages/mashumaro/serializer/base/metaprogramming.py", line 270, in add_from_dict
    pre_deserialize = self.get_declared_hook(__PRE_DESERIALIZE__)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/mashumaro/serializer/base/metaprogramming.py", line 255, in get_declared_hook
    if not is_dataclass_dict_mixin(cls):
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/mashumaro/meta/helpers.py", line 247, in is_dataclass_dict_mixin
    return type_name(t) == DataClassDictMixinPath
           ^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/mashumaro/meta/helpers.py", line 93, in type_name
    elif is_generic(t) and not is_type_origin:
         ^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/mashumaro/meta/helpers.py", line 161, in is_generic
    raise NotImplementedError
NotImplementedError

Environment

- OS: Docker
- Python: 3.11
- dbt (working version): dbt-postgres:1.2.2
- dbt (regression version): dbt-postgres:1.2.3

Which database adapter are you using with dbt?

postgres

Additional Context

No response

@joelchartier joelchartier added bug Something isn't working regression triage labels Nov 17, 2022
@jtcohen6 jtcohen6 added duplicate This issue or pull request already exists and removed triage labels Nov 17, 2022
@jtcohen6
Copy link
Contributor

jtcohen6 commented Nov 17, 2022

Thanks @joelchartier! I think this is the same as #6275. We started building Docker images using Python 3.11 before it's officially supported by dbt-core.

We just reverted the upgrade for our Docker process (#6281), and we should be re-releasing those faulty images.

cc @leahwicz - good callout that this affected 1.2.latest as well - let's close this issue once the new image is pushed?

@leahwicz
Copy link
Contributor

This should be fixed now. @joelchartier please let me know if you see differently

@dbeatty10 dbeatty10 added the jira label Nov 18, 2022
@github-actions github-actions bot changed the title [Regression] Python error while running dbt deps command when using docker image ghcr.io/dbt-labs/dbt-postgres:1.2.latest [CT-1528] [Regression] Python error while running dbt deps command when using docker image ghcr.io/dbt-labs/dbt-postgres:1.2.latest Nov 18, 2022
@carlagouveia
Copy link

Apparently, dependabot caused a regression of this ticket here: 6cbf66d

I'm having the same issue with latest master since the image has been bumped to 3.11.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists jira regression
Projects
None yet
Development

No branches or pull requests

5 participants