diff --git a/.changes/unreleased/Fixes-20230405-124315.yaml b/.changes/unreleased/Fixes-20230405-124315.yaml new file mode 100644 index 00000000000..8f10984e62e --- /dev/null +++ b/.changes/unreleased/Fixes-20230405-124315.yaml @@ -0,0 +1,6 @@ +kind: Fixes +body: avoid dbtRunner default callbacks being shared across instances +time: 2023-04-05T12:43:15.418016-04:00 +custom: + Author: chamini2 + Issue: "7278" diff --git a/core/dbt/cli/main.py b/core/dbt/cli/main.py index 5bb0f9ea696..14beb3c4fb7 100644 --- a/core/dbt/cli/main.py +++ b/core/dbt/cli/main.py @@ -40,11 +40,14 @@ def __init__( project: Project = None, profile: Profile = None, manifest: Manifest = None, - callbacks: List[Callable[[EventMsg], None]] = [], + callbacks: List[Callable[[EventMsg], None]] = None, ): self.project = project self.profile = profile self.manifest = manifest + + if callbacks is None: + callbacks = [] self.callbacks = callbacks def invoke(self, args: List[str]) -> Tuple[Optional[List], bool]: