my prefect server setup prefect-metrics.waow.tech
python orchestration
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix enrich: lazy-import prefect_dbt to bypass mashumaro/py3.14 compat issue

dbt-common -> mashumaro fails at import time on Python 3.14 due to
UnserializableField in JSONObjectSchema. Moving imports inside the flow
function defers the issue until runtime and unblocks CI deployment registration.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

zzstoatzz a49b585b 61ded3ae

+11 -8
+11 -8
flows/enrich.py
··· 1 1 import subprocess 2 - from datetime import timedelta 3 2 from pathlib import Path 4 3 5 4 from prefect import flow, get_run_logger 6 - from prefect_dbt.core._orchestrator import ( 7 - CacheConfig, 8 - ExecutionMode, 9 - PrefectDbtOrchestrator, 10 - TestStrategy, 11 - ) 12 - from prefect_dbt.core.settings import PrefectDbtSettings 13 5 14 6 ANALYTICS_DIR = Path(__file__).parent.parent / "analytics" 15 7 16 8 17 9 @flow(name="enrich", log_prints=True) 18 10 def enrich(): 11 + # lazy imports: dbt-common -> mashumaro has Python 3.14 compat issues at 12 + # module load time; importing inside the function defers until flow runs 13 + from datetime import timedelta 14 + from prefect_dbt.core._orchestrator import ( 15 + CacheConfig, 16 + ExecutionMode, 17 + PrefectDbtOrchestrator, 18 + TestStrategy, 19 + ) 20 + from prefect_dbt.core.settings import PrefectDbtSettings 21 + 19 22 logger = get_run_logger() 20 23 21 24 # compile manifest.json so PrefectDbtOrchestrator can parse the project