PrefectHQ / prefect

Prefect is a workflow orchestration framework for building resilient data pipelines in Python.
https://prefect.io
Apache License 2.0
15.31k stars 1.5k forks source link

Input field type switches when clearing value in optional field #14265

Open j-tr opened 5 days ago

j-tr commented 5 days ago

First check

Bug summary

An optional int input field switches to None whenever the integer value is cleared. This is a minor inconvenience when updating values as at least one digit of the old value needs to remain in the field and can only be removed when the new value is entered.

Reproduction

Any deployment with optional int parameters

Error

See screencast

Browsers

Prefect version

Prefect Cloud

Additional context

See example: Field has value 7. User wants to change it. As soon as the value is removed the field jumps to None. New value can only be entered by appending it to the old value and then removing the old value. output

pleek91 commented 2 days ago

@j-tr I tried to reproduce this and wasn't able to. I was using the following flow definition and I was able to clear out the input and enter a new value without it switching to None.

I was using this for my flow definition

def schema_testing(value: Optional[int] = 7):

Could you provide me an example flow definition that reproduces this? The json schema for the deployment would also be helpful.