Skip to content

PrefectDbtRunner not working when running in parallel tasks #19927

@sol-joseph

Description

@sol-joseph

Bug summary

We're using prefect_dask.DaskTaskRunner to run tasks in parallel. We have a flow that runs multiple tasks in parallel, each of which call PrefectDbtRunner. This previously worked fine when using DbtCoreOperation.

Now, they're interfering with each other e.g. They fail because of deps not running correctly as it's trying to import packages that have nothing to do with it, but are in the other one. When run in series they all work fine.

The also all seem to fail as soon as one of them gets a bug.

Version info

Version:              3.6.5
API version:          0.8.4
Python version:       3.10.19
Git commit:           857c60b5
Built:                Thu, Dec 04, 2025 08:01 PM
OS/Arch:              linux/x86_64
Profile:              ephemeral
Server type:          cloud
Pydantic version:     2.12.5
Server:
  Database:           sqlite
  SQLite version:     3.46.1
Integrations:
  prefect-dbt:        0.7.14.dev71+gadf77ef0a
  prefect-dask:       0.3.6
  prefect-shell:      0.3.1

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingintegrationsRelated to integrations with other services

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions