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

[DRC-861] [Bug] Abstract class SqlmeshAdapter can't be instantiated when trying to start recce server #473

Open
db-tycoon-stephen opened this issue Nov 1, 2024 · 1 comment
Labels
bug Something isn't working linear Created by Linear-GitHub Sync Low priority Created by Linear-GitHub Sync triage Triage required

Comments

@db-tycoon-stephen
Copy link

db-tycoon-stephen commented Nov 1, 2024

Current Behavior

This command fails
recce server --sqlmesh --sqlmesh-envs prod:dev
with the following error
File "/Users/ssciortino/.pyenv/versions/3.12.3/envs/recce/lib/python3.12/site-packages/recce/adapter/sqlmesh_adapter.py", line 90, in load return cls(context=context, base_env=base_env, curr_env=curr_env) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: Can't instantiate abstract class SqlmeshAdapter without an implementation for abstract method 'select_nodes'

Expected Behavior

Recce server should run without error.

Steps To Reproduce

  1. Install recce in a virtualenv (3.12.3)
  2. Install sqlmesh[duckdb] in virtualenv
  3. Create prod and dev environments in sqlMesh
  4. Run command above

Relevant log output

(recce) *[main][~/Projects/recce]$ recce server --sqlmesh --sqlmesh-envs prod:dev
────────────────────────────────────────────────────────────────────────────────────────────────────── Recce Server ──────────────────────────────────────────────────────────────────────────────────────────────────────
INFO:     Started server process [86865]
INFO:     Waiting for application startup.
WARNING:  SQLMesh adapter is still in EXPERIMENTAL mode.
ERROR:    Traceback (most recent call last):
  File "/Users/ssciortino/.pyenv/versions/3.12.3/envs/recce/lib/python3.12/site-packages/starlette/routing.py", line 693, in lifespan
    async with self.lifespan_context(app) as maybe_state:
  File "/Users/ssciortino/.pyenv/versions/3.12.3/lib/python3.12/contextlib.py", line 210, in __aenter__
    return await anext(self.gen)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/ssciortino/.pyenv/versions/3.12.3/envs/recce/lib/python3.12/site-packages/fastapi/routing.py", line 133, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/Users/ssciortino/.pyenv/versions/3.12.3/lib/python3.12/contextlib.py", line 210, in __aenter__
    return await anext(self.gen)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/ssciortino/.pyenv/versions/3.12.3/envs/recce/lib/python3.12/site-packages/fastapi/routing.py", line 133, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/Users/ssciortino/.pyenv/versions/3.12.3/lib/python3.12/contextlib.py", line 210, in __aenter__
    return await anext(self.gen)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/ssciortino/.pyenv/versions/3.12.3/envs/recce/lib/python3.12/site-packages/recce/server.py", line 48, in lifespan
    ctx = load_context(**kwargs, state_loader=state_loader)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/ssciortino/.pyenv/versions/3.12.3/envs/recce/lib/python3.12/site-packages/recce/core.py", line 247, in load_context
    recce_context = RecceContext.load(**kwargs)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/ssciortino/.pyenv/versions/3.12.3/envs/recce/lib/python3.12/site-packages/recce/core.py", line 40, in load
    context.adapter = SqlmeshAdapter.load(**kwargs)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/ssciortino/.pyenv/versions/3.12.3/envs/recce/lib/python3.12/site-packages/recce/adapter/sqlmesh_adapter.py", line 90, in load
    return cls(context=context, base_env=base_env, curr_env=curr_env)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Can't instantiate abstract class SqlmeshAdapter without an implementation for abstract method 'select_nodes'

ERROR:    Application startup failed. Exiting.

Environment

  • recce: 0.39.0
  • OS: MacOS Sequoia 15.0
  • Python: 3.12.3
  • Data Warehouse: DuckDb
  • sqlMesh: 0.130.0

Additional Context

No response

DRC-861

@db-tycoon-stephen db-tycoon-stephen added bug Something isn't working triage Triage required labels Nov 1, 2024
@popcornylu popcornylu added the linear Created by Linear-GitHub Sync label Nov 4, 2024
@popcornylu popcornylu changed the title [Bug] Abstract class SqlmeshAdapter can't be instantiated when trying to start recce server [DRC-861] [Bug] Abstract class SqlmeshAdapter can't be instantiated when trying to start recce server Nov 4, 2024
@popcornylu popcornylu added the Low priority Created by Linear-GitHub Sync label Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working linear Created by Linear-GitHub Sync Low priority Created by Linear-GitHub Sync triage Triage required
Projects
None yet
Development

No branches or pull requests

3 participants
@popcornylu @db-tycoon-stephen and others