-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Description
Description
prefect-dbt >= 0.7.9 hangs indefinitely when executing a dbt build run that includes dbt models with docs blocks whose individual line lengths exceed 40 characters. dbt continues executing in the background (e.g., queries run successfully in the data warehouse), but Prefect never receives completion signals and the flow/tasks remain stuck in a Running state indefinitely.
The hang does not occur with prefect-dbt == 0.7.8, indicating a regression introduced in 0.7.9.
Steps to Reproduce
- Create a dbt model that includes a docs block with at least one line longer than 40 characters, e.g.:
-- models/my_model.sql {% docs my_model %} This is a description that exceeds forty characters in length. {% enddocs %}
- Run a
dbt buildviaprefect-dbt >= 0.7.9 - Observe that Prefect hangs indefinitely at the affected model(s)
Expected Behavior
The flow and tasks complete normally, reflecting dbt's actual execution state.
Actual Behavior
Prefect hangs indefinitely. dbt continues running in the background but Prefect never receives or processes the completion event. The flow must be manually cancelled.
Workarounds
- Downgrade to
prefect-dbt == 0.7.8 - Remove or shorten lines in dbt docs blocks to stay under 40 lines (2500 Characters)
Version Information
- prefect-dbt: >= 0.7.9 (regression; 0.7.8 is unaffected)
- Prefect: 3.x
Additional Context
This appears to be related to how prefect-dbt >= 0.7.9 reads or parses dbt artifact/node metadata. The 40-character line threshold suggests a possible buffer or parsing limit introduced in that version.