Skip to content

Commit

Permalink
Explicitly set Environment invocation context
Browse files Browse the repository at this point in the history
  • Loading branch information
BAntonellini committed Aug 9, 2024
1 parent 7a76d0d commit 181a694
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/dbt_core_interface/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,13 @@ def parse_project(self, init: bool = False) -> None:
# has acquired the lock, TODO: Lets implement a debounce-like buffer here
with self.parsing_mutex:
if init:
if (__dbt_major_version__, __dbt_minor_version__) >= (1, 8):
from dbt_common.clients.system import get_env
from dbt_common.context import set_invocation_context

set_invocation_context(get_env())


set_from_args(self.base_config, self.base_config)
# We can think of `RuntimeConfig` as a dbt-core "context" object
# where a `Project` meets a `Profile` and is a superset of them both
Expand Down

0 comments on commit 181a694

Please sign in to comment.