https://prefect.io logo
Title
t

Thet Naing

02/26/2023, 9:04 PM
We have been getting tons of issues with our Prefect deployments without any changes to our deployments. They suddenly stopped running and all would go into "late" statuses for hours on end. When starting the agents locally, I see this error repeated endlessly. Any idea what may be causing this?
prefect.exceptions.PrefectHTTPStatusError: Client error '422 Unprocessable Entity' for url '<https://api.prefect.cloud/api/accounts/abc/workspaces/xyz/deployments/None>'
Response: {'exception_message': 'Invalid request received.', 'exception_detail': [{'loc': ['path', 'id'], 'msg': 'value is not a valid uuid', 'type': 'type_error.uuid'}], 'request_body': None}
For more information check: <https://httpstatuses.com/422>
16:00:39.141 | ERROR   | prefect.agent - Failed to get infrastructure for flow run 'abc'. Flow run cannot be cancelled.
Traceback (most recent call last):
  File "/Users/thet/SystemInternal/information-extraction-pipeline/venv/lib/python3.10/site-packages/prefect/agent.py", line 322, in cancel_run
    infrastructure = await self.get_infrastructure(flow_run)
  File "/Users/thet/SystemInternal/information-extraction-pipeline/venv/lib/python3.10/site-packages/prefect/agent.py", line 381, in get_infrastructure
    deployment = await self.client.read_deployment(flow_run.deployment_id)
  File "/Users/thet/SystemInternal/information-extraction-pipeline/venv/lib/python3.10/site-packages/prefect/client/orchestration.py", line 1504, in read_deployment
    response = await self._client.get(f"/deployments/{deployment_id}")
  File "/Users/thet/SystemInternal/information-extraction-pipeline/venv/lib/python3.10/site-packages/httpx/_client.py", line 1757, in get
    return await self.request(
  File "/Users/thet/SystemInternal/information-extraction-pipeline/venv/lib/python3.10/site-packages/httpx/_client.py", line 1533, in request
    return await self.send(request, auth=auth, follow_redirects=follow_redirects)
  File "/Users/thet/SystemInternal/information-extraction-pipeline/venv/lib/python3.10/site-packages/prefect/client/base.py", line 253, in send
    response.raise_for_status()
  File "/Users/thet/SystemInternal/information-extraction-pipeline/venv/lib/python3.10/site-packages/prefect/client/base.py", line 130, in raise_for_status
    raise PrefectHTTPStatusError.from_httpx_error(exc) from exc.__cause__
1
c

Christopher Boyd

02/27/2023, 7:55 PM
Hi Thet, What version of prefect are you currently using
b

Bianca Hoch

02/28/2023, 4:26 PM
Hey Thet! Just wanted to chime in here. Our engineers took a look at this and, from what I understand, this log message occurs when a deployment for a flow run is deleted while the run is executing.
t

Thet Naing

02/28/2023, 8:03 PM
Found the issue, thank you! It was actually a problem with our GCP Cloud Run infra
🙌 1