[Bug] query-comments aren't appended when a Manifest is passed to dbtRunner #9546
Closed
2 tasks done
Labels
backport 1.7.latest
bug
Something isn't working
High Severity
bug with significant impact that should be resolved in a reasonable timeframe
Impact: Exp
python_api
Issues related to dbtRunner Python entry point
Is this a new bug in dbt-core?
Current Behavior
The IDE uses the dbtRunner as an entry point for dbt invocations. One common flow is to get the manifest obj returned after calling a parse as a part of the dbtRunnerResult, then pass it back to the runner obj for subsequent commands until the user makes a change to their project. We have observed that passing a Manifest object to the dbtRunner results in the removal of expected query-comments. We confirmed the comments are in the sql as expected as long as dbtRunner is instantiated without a cached manifest.
Expected Behavior
If a query-comment is defined,
sql
returned from dbt invocations could contain those comments regardless of how the dbtRunner is invokedSteps To Reproduce
Here are reliable repro steps from a python repl (this is using my locally installed dbt 1.7.7).
Relevant log output
No response
Environment
Which database adapter are you using with dbt?
snowflake
Additional Context
Experience team ticket with historical context -- https://dbtlabs.atlassian.net/browse/XP-2671
The text was updated successfully, but these errors were encountered: