https://prefect.io logo
s

Siva Balusu

01/07/2023, 3:16 AM
Hi I am on prefect 2.0 cloud and my deployment suddenly stopped working with the below error. Deployment pushed the flows to s3 bucket but agent is having issues to get those flows?
Copy code
Flow could not be retrieved from deployment.
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/prefect/engine.py", line 260, in retrieve_flow_then_begin_flow_run
    flow = await load_flow_from_flow_run(flow_run, client=client)
  File "/usr/local/lib/python3.10/site-packages/prefect/client/utilities.py", line 47, in with_injected_client
    return await fn(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/prefect/deployments.py", line 167, in load_flow_from_flow_run
    await storage_block.get_directory(from_path=deployment.path, local_path=".")
  File "/usr/local/lib/python3.10/site-packages/prefect/filesystems.py", line 463, in get_directory
    return await self.filesystem.get_directory(
  File "/usr/local/lib/python3.10/site-packages/prefect/filesystems.py", line 308, in get_directory
    return self.filesystem.get(from_path, local_path, recursive=True)
  File "/usr/local/lib/python3.10/site-packages/fsspec/asyn.py", line 113, in wrapper
    return sync(self.loop, func, *args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/fsspec/asyn.py", line 98, in sync
    raise return_result
  File "/usr/local/lib/python3.10/site-packages/fsspec/asyn.py", line 53, in _runner
    result[0] = await coro
  File "/usr/local/lib/python3.10/site-packages/fsspec/asyn.py", line 551, in _get
    rpaths = await self._expand_path(rpath, recursive=recursive)
  File "/usr/local/lib/python3.10/site-packages/fsspec/asyn.py", line 751, in _expand_path
    out = await self._expand_path([path], recursive, maxdepth)
  File "/usr/local/lib/python3.10/site-packages/fsspec/asyn.py", line 775, in _expand_path
    raise FileNotFoundError(path)
FileNotFoundError: ['prefect-bucket/prefect_test2']
[7:10 PM] @here any help is much appreciated [7:10 PM] agent is in kubernetes
Copy code
[7:10 PM] I have no name!@prefect-agent-656bfcdc7d-pqjzx:~$ pip list | grep "prefect"
prefect                    2.7.1
prefect-aws                0.2.3
prefect-dask               0.2.2
prefect-kv                 0.1.0
prefect-snowflake          0.25
1
c

Christopher Boyd

01/09/2023, 2:57 PM
Hi Siva - For convenience in the channel, can you move the traceback into the thread? Separately, the error is a file not found in the bucket - prefect-bucket/prefect_test2
How is the flow, deployment, and storage block configured?
and is prefect_test2 the name of the flow, or the name of a directory in that bucket?
b

Bianca Hoch

01/09/2023, 9:16 PM
Cross posting here to keep track of the solution. Great job finding a solution, Siva! https://prefect-community.slack.com/archives/CM28LL405/p1673230626913829?thread_ts=1673061009.567589&cid=CM28LL405
3 Views