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
An Optional input that has a parameter requirement, is being coerced into a required field.
Below is a sample repo that demonstrates the issue - notably, if required_integer: int, is entirely removed (leaving only the Optional[InputModel], the custom deployment cannot be submitted. It can be submitted from the JSON page, however.
from typing import Optional
import prefect
from pydantic import BaseModel
class InputModel(BaseModel):
required_field: int
@prefect.flow(name="test-flow")
def test(
required_integer: int,
optional_input_model: Optional[InputModel] = None,
) -> None:
logger = prefect.get_run_logger()
logger.info(f"{required_integer=}")
logger.info(f"{optional_input_model=}")
The text was updated successfully, but these errors were encountered:
@prefectcboyd - since there is a workaround by using the json input, I'm marking as medium, please let me know if you think this needs a higher priority.
An
Optional
input that has a parameter requirement, is being coerced into a required field.Below is a sample repo that demonstrates the issue - notably, if
required_integer: int,
is entirely removed (leaving only theOptional[InputModel]
, the custom deployment cannot be submitted. It can be submitted from the JSON page, however.The text was updated successfully, but these errors were encountered: