Andrew Sullivan-Knoff
03/31/2026, 5:12 AMDbtCoreOperation. With 765+ nodes, output from node 5 onward is dropped with a [truncated] marker. This was not happening on Prefect 3.4.9 -- logs were complete in the UI before the upgrade.
Setup:
- prefect==3.6.x
- prefect-dbt==0.7.4
- PREFECT_LOGGING_TO_API_MAX_LOG_SIZE=10000000
What we know:
- DbtCoreOperation extends ShellOperation and pipes raw dbt stdout to Prefect’s log API
- Truncation is confirmed at the API level -- prefect flow-run logs also shows truncated output, so it’s not a UI rendering issue
- Logs are complete in the GitHub Actions console, confirming the subprocess output itself is fine
- Raising PREFECT_LOGGING_TO_API_MAX_LOG_SIZE has not resolved the issue
Question: Did ShellOperation log handling change between 3.4.x and 3.6.x -- specifically how stdout lines are batched and sent to the log API? Is this a known regression, and if so is there a recommended fix short of switching to dbtRunner for all commands?
Any guidance appreciated.Jake Kaplan
03/31/2026, 5:07 PMAndrew Sullivan-Knoff
04/01/2026, 12:11 AMJake Kaplan
04/01/2026, 2:42 AMprefect==3.6.4 included this PR https://github.com/PrefectHQ/prefect/pull/19496. Prefect Cloud has always had max single log size it accepts.
Prior to this change these logs were sent to Cloud and silently rejected for being too big. Now they're just truncated but are actually accepted.
If theres some logging from an integration that you'd like to see chunked, I'd definitely encourage you to open a feature request!Andrew Sullivan-Knoff
04/01/2026, 4:30 AMdbt build command had 765 nodes, I could see the message from each node. After upgrading, I was getting the truncation message from using DbtCoreOperation. I’m experimenting with setting stream_output=false (although this is a pain for local dev) and handling the dbtRunner myself, although that looks to cause some memory issues running in process. My hope is that there is a simple way to run a dbt command like dbt build and have all the nodes show up in the Prefect UI as the command is running. Is there something I am missing here?Jake Kaplan
04/01/2026, 11:34 AMprefect did you upgrade to?
It looks like there was a regression in 3.6.14 that was fixed in 3.6.22 where output could be consolidated into one single log instead of many: https://github.com/PrefectHQ/prefect/pull/20739Andrew Sullivan-Knoff
04/02/2026, 4:10 AMAndrew Sullivan-Knoff
04/02/2026, 2:46 PMJake Kaplan
04/02/2026, 2:52 PMAndrew Sullivan-Knoff
04/03/2026, 9:44 AMJake Kaplan
04/03/2026, 2:10 PMprefect-shell and prefect-dbt to the latest versions?Andrew Sullivan-Knoff
04/03/2026, 2:19 PM