[CT-1621] [Feature] de-globalize things through contextvar #6399
Labels
enhancement
New feature or request
python_api
Issues related to dbtRunner Python entry point
Refinement
Maintainer input needed
Is this your first time submitting a feature request?
Describe the feature
We have a few things inside dbt-core that are python global objects. Some examples are
active_user
,EVENT_MANAGER
. With the future ofdbt-server
running multipledbt-core
invocations at the same time, we should make sure those multiple invocation don't overwrite those objects.In the example here,
contextvars
is a great way of dealing with global variables during concurrency.We should make sure we move the usage of all global object in
dbt-core
intocontextvars
The text was updated successfully, but these errors were encountered: