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

Better error when launching execution on misconfigured dask #2127

Open
natekupp opened this issue Feb 7, 2020 · 0 comments
Open

Better error when launching execution on misconfigured dask #2127

natekupp opened this issue Feb 7, 2020 · 0 comments
Labels
integration: dask Related to dagster-dask type: troubleshooting Related to debugging and error messages

Comments

@natekupp
Copy link
Contributor

natekupp commented Feb 7, 2020

With a test job in test-dask.py:

from dagster import (
    ModeDefinition,
    pipeline,
    solid,
    RepositoryDefinition,
)
from dagster.core.definitions.executor import default_executors
from dagster_dask import dask_executor


@solid
def simple(_):
    return 1


@pipeline(mode_defs=[ModeDefinition(executor_defs=default_executors + [dask_executor])])
def dask_engine_pipeline():
    return simple()


def define_repo():
    return RepositoryDefinition(name='foobar', pipeline_defs=[dask_engine_pipeline])

and repository.yaml

repository:
  file: test-dask.py
  fn: define_repo

Then launching a dask scheduler and worker:

dask-scheduler
dask-worker localhost:8786

Running this pipeline in dagit with config:

storage:
  filesystem:
execution:
  dask:

will result in:

Traceback (most recent call last):
  File “/Users/nate/.pyenv/versions/3.7.4/envs/dagster37/lib/python3.7/site-packages/sqlalchemy/pool/base.py”, line 671, in _finalize_fairy
    fairy._reset(pool)
  File “/Users/nate/.pyenv/versions/3.7.4/envs/dagster37/lib/python3.7/site-packages/sqlalchemy/pool/base.py”, line 858, in _reset
    pool._dialect.do_rollback(self)
  File “/Users/nate/.pyenv/versions/3.7.4/envs/dagster37/lib/python3.7/site-packages/sqlalchemy/engine/default.py”, line 502, in do_rollback
    dbapi_connection.rollback()
sqlite3.ProgrammingError: SQLite objects created in a thread can only be used in that same thread. The object was created in thread id 123145393209344 and this is thread id 4457528768.

When not specifying an address and running, it works fine, and launching a local dask scheduler/worker and specifying localhost:8786 address also works. But, not specifying an address w/ a running local cluster produces that error, and we should provide the user with a clearer error message

@natekupp natekupp added enhancement type: good first issue Good for newcomers integration: dask Related to dagster-dask labels Feb 7, 2020
@natekupp natekupp added this to the 0.9.0 (planned) milestone Jun 1, 2020
@catherinewu catherinewu added the type: troubleshooting Related to debugging and error messages label Aug 27, 2020
@natekupp natekupp modified the milestones: 0.9.0, 0.9.x Sep 16, 2020
@natekupp natekupp modified the milestones: 0.9.x, 0.10.0 Nov 10, 2020
@sryza sryza removed this from the 0.10.0 milestone Apr 1, 2021
@sryza sryza removed the platform label Apr 22, 2023
@gibsondan gibsondan removed the type: good first issue Good for newcomers label Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integration: dask Related to dagster-dask type: troubleshooting Related to debugging and error messages
Projects
None yet
Development

No branches or pull requests

6 participants