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
Starting from prefect version 3.1.11, the creating a flow run from a deployment fails with the following error.
main $ pip freeze | grep prefect
prefect==3.1.11
prefect-ray==0.4.3
main $ prefect deployment run 'retry-flow/retry_flow'
Creating flow run for deployment 'retry-flow/retry_flow'...
Traceback (most recent call last):
File "/home/ubuntu/prefect-poc/.venv/lib/python3.10/site-packages/prefect/cli/_utilities.py", line 43, in wrapper
return fn(*args, **kwargs)
File "/home/ubuntu/prefect-poc/.venv/lib/python3.10/site-packages/prefect/cli/_types.py", line 155, in sync_fn
return asyncio.run(async_fn(*args, **kwargs))
File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
return future.result()
File "/home/ubuntu/prefect-poc/.venv/lib/python3.10/site-packages/prefect/cli/deployment.py", line 857, in run
flow_run = await client.create_flow_run_from_deployment(
File "/home/ubuntu/prefect-poc/.venv/lib/python3.10/site-packages/prefect/client/orchestration/__init__.py", line 681, in create_flow_run_from_deployment
response = await self._client.post(
File "/home/ubuntu/prefect-poc/.venv/lib/python3.10/site-packages/httpx/_client.py", line 1859, in post
return await self.request(
File "/home/ubuntu/prefect-poc/.venv/lib/python3.10/site-packages/httpx/_client.py", line 1540, in request
return await self.send(request, auth=auth, follow_redirects=follow_redirects)
File "/home/ubuntu/prefect-poc/.venv/lib/python3.10/site-packages/prefect/client/base.py", line 355, in send
response.raise_for_status()
File "/home/ubuntu/prefect-poc/.venv/lib/python3.10/site-packages/prefect/client/base.py", line 163, in raise_for_status
raise PrefectHTTPStatusError.from_httpx_error(exc) from exc.__cause__
prefect.exceptions.PrefectHTTPStatusError: Client error '422 Unprocessable Entity' for url 'http://127.0.0.1:4200/api/deployments/9c692ce5-0945-490a-9f05-5101511c8152/create_flow_run'
Response: {'exception_message': 'Invalid request received.', 'exception_detail': [{'type': 'extra_forbidden', 'loc': ['body', 'labels'], 'msg': 'Extra inputs are not permitted', 'input': {}}], 'request_body': {'state': {'type': 'SCHEDULED', 'name': 'Scheduled', 'message': None, 'state_details': {'scheduled_time': '2025-01-10T00:21:18.168599Z', 'traceparent': None}, 'data': None}, 'name': None, 'parameters': {}, 'context': {}, 'tags': [], 'idempotency_key': None, 'parent_task_run_id': None, 'job_variables': {}, 'labels': {}}}
For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/422
An exception occurred.
Even though the labels is not provided in creating object DeploymentFlowRunCreate, the labels is initialized with {} and this is not accepted in the server since:
Bug summary
Starting from prefect version 3.1.11, the creating a flow run from a deployment fails with the following error.
Even though the
labels
is not provided in creating objectDeploymentFlowRunCreate
, thelabels
is initialized with{}
and this is not accepted in the server since:https://github.com/PrefectHQ/prefect/blob/main/src/prefect/client/schemas/actions.py#L400
Version info
Additional context
No response
The text was updated successfully, but these errors were encountered: