Description
Bug summary
Describe the bug
Configuring parameter overrides for a Schedule via the Prefect UI results in corrupted parameters being passed to the flow run. Specifically, the target parameter field (e.g., dataset_ids
) is incorrectly replaced with the entire flow parameter set, serialized as a JSON string within a {"value": "...", "__prefect_kind": "json"}
structure which will cause flow run error.
Crucially, configuring the same parameter override directly via the Prefect API (e.g., using httpx
or the Python client) works as expected.
To Reproduce
- Define a flow with parameters (e.g.,
dataset_ids: List[int]
). - Create a Deployment for the flow.
- Using the Prefect UI: Create a Schedule for the deployment and configure it to override the
dataset_ids
parameter (e.g., set value to[35]
). - Trigger the schedule or wait for it to run.
- Observe the flow run logs: The
dataset_ids
parameter received by the flow is the corrupted JSON structure containing the full parameter set, not[35]
. This often leads toTypeError: unhashable type: 'dict'
.
Expected behavior
When using the UI to override dataset_ids
to [35]
, the flow run should receive dataset_ids=[35]
, consistent with the behavior when using the API.
Actual behavior (UI only)
The flow run receives dataset_ids
as {"value": "{ "dataset_ids": [1, 2]}", "__prefect_kind": "json"}
(example structure).
Version info
Version: 3.2.7
API version: 0.8.4
Python version: 3.10.12
Git commit: d4d9001e
Built: Fri, Feb 21, 2025 7:39 PM
OS/Arch: linux/x86_64
Profile: ephemeral
Server type: ephemeral
Pydantic version: 2.10.6
Server:
Database: sqlite
SQLite version: 3.37.2
Integrations:
prefect-docker: 0.6.2
prefect-kubernetes: 0.5.3
prefect-gitlab: 0.3.1
Additional context
No response