Skip to content

[Bug] Prefect UI Schedule Parameter Override Corrupts Parameters,but API Works Correctly #17782

Open
@zyn71

Description

@zyn71

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

  1. Define a flow with parameters (e.g., dataset_ids: List[int]).
  2. Create a Deployment for the flow.
  3. 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]).
  4. Trigger the schedule or wait for it to run.
  5. 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 to TypeError: 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions