You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the existing issues, and I could not find an existing issue for this bug
Current Behavior
fromdbt.cli.mainimportdbtRunner, listfromdbt.events.base_typesimportEventMsgdefprint_callback(event: EventMsg):
print("Got an event:", event.info.name)
dbt=dbtRunner()
dbt.callbacks.append(print_callback)
dbt2=dbtRunner()
dbt2.invoke(['list']) # this prints the event names
example run:
❯ python runner.py
16:32:42 Running with dbt=1.5.0-b5
Got an event: MainReportVersion
Got an event: MainReportArgs
16:32:42 [WARNING]: Deprecated functionality
The `target-path` config in `dbt_project.yml` has been deprecated, and will no
longer be supported in a future version of dbt-core. If you wish to write dbt
artifacts to a custom directory, please use the --target-path CLI flag or
DBT_TARGET_PATH env var instead.
Got an event: ConfigTargetPathDeprecation
Got an event: SendingEvent
Got an event: SendingEvent
Got an event: SendingEvent
Got an event: StateCheckVarsHash
Got an event: PartialParsingEnabled
Got an event: PartialParsingSkipParsing
Got an event: SendingEvent
Got an event: SendingEvent
16:32:42 Found 4 models, 0 tests, 0 snapshots, 0 analyses, 309 macros, 0 operations, 0 seed files, 0 sources, 0 exposures, 0 metrics, 0 groups
Got an event: FoundStats
Got an event: SendingEvent
simple_test.base.model_a
simple_test.base.model_b
simple_test.python.model_c
simple_test.model_d
Got an event: CommandCompleted
Got an event: SendingEvent
Got an event: FlushEvents
Expected Behavior
dbtRunner instances should be isolated from one another.
github-actionsbot
changed the title
[Bug] dbtRunner instances share the callbacks across instances when no callbacks are passed
[CT-2375] [Bug] dbtRunner instances share the callbacks across instances when no callbacks are passed
Apr 5, 2023
Is this a new bug in dbt-core?
Current Behavior
example run:
Expected Behavior
dbtRunner instances should be isolated from one another.
Steps To Reproduce
See current behavior
Relevant log output
No response
Environment
Which database adapter are you using with dbt?
postgres
Additional Context
https://stackoverflow.com/questions/366422/how-can-i-avoid-issues-caused-by-pythons-early-bound-default-parameters-e-g-m
The text was updated successfully, but these errors were encountered: