prefect
prefect copied to clipboard
Integer too large `ValidationError` in `FlowRun.parameters` leads to 500 response when polling for runs
Bug summary
If a flow run contains an integer that exceeds the 64-bit range, a ValidationError
will be raised when trying to read the flow run from the API, including polling for scheduled work. This exception leads to a 500 response, potentially blocking other work from executing.
ValidationError(model='FlowRun', errors=[{'loc': ('parameters',), 'msg': 'Integer exceeds 64-bit range', 'type': 'type_error'}])
We should do two things to mitigate
- Wherever possible, validate flow run parameters when they are created. Ideally these runs would never make it into the database.
- In the event we still encounter it, catch
ValidationError
and return a 422 response with an explanation.
Version info (prefect version
output)
`main`
Additional context
No response