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
The Prefect client uses the exclude_unset setting for model_dump(), which has the unfortunate side effect of dropping default fields that were mutated afterwards.
this will persist the flow run parameters as {"param": {}} instead of {"param": {"dropped": ["mutated"]}}
I would recommend considering setting exclude_default instead of exclude_unset as this is a really nasty foot gun and took a lot of time for me to get to the bottom of.
Bug summary
https://github.com/PrefectHQ/prefect/blob/main/src/prefect/client/orchestration/_deployments/client.py#L614
The Prefect client uses the
exclude_unset
setting formodel_dump()
, which has the unfortunate side effect of dropping default fields that were mutated afterwards.A simple example is
this will persist the flow run parameters as
{"param": {}}
instead of{"param": {"dropped": ["mutated"]}}
I would recommend considering setting
exclude_default
instead ofexclude_unset
as this is a really nasty foot gun and took a lot of time for me to get to the bottom of.See for more explanations below:
pydantic/pydantic#5749
pydantic/pydantic#9866
Version info
Additional context
No response
The text was updated successfully, but these errors were encountered: