Blake Stefansen
08/25/2022, 6:50 PMprocess
infrastructure and the s3
block for filesystem storage. I build my deployment, the yaml is generated, and my flow code is uploaded to s3.
I have prefect orion running locally, and this deployment applied to my local prefect. I then start a local agent within my python virtual environment.
In orion, I click Run
on my deployment. The flow run is moved to my local work queue, my local agent picks up the flow run, and builds the infrastructure.
The agent then runs the prefect engine, which begins pulling my flow code from s3. In doing so, I receive this flow run failure log:
Flow could not be retrieved from deployment.
Traceback (most recent call last):
File "C:\Users\BStefansen\.virtualenvs\lbx-broadband-pipeline-4k_4F-H8\lib\site-packages\prefect\engine.py", line 254, in retrieve_flow_then_begin_flow_run
flow = await load_flow_from_flow_run(flow_run, client=client)
File "C:\Users\BStefansen\.virtualenvs\lbx-broadband-pipeline-4k_4F-H8\lib\site-packages\prefect\client.py", line 104, in with_injected_client
return await fn(*args, **kwargs)
File "C:\Users\BStefansen\.virtualenvs\lbx-broadband-pipeline-4k_4F-H8\lib\site-packages\prefect\deployments.py", line 55, in load_flow_from_flow_run
await storage_block.get_directory(from_path=None, local_path=".")
File "C:\Users\BStefansen\.virtualenvs\lbx-broadband-pipeline-4k_4F-H8\lib\site-packages\prefect\filesystems.py", line 399, in get_directory
return await self.filesystem.get_directory(
File "C:\Users\BStefansen\.virtualenvs\lbx-broadband-pipeline-4k_4F-H8\lib\site-packages\prefect\filesystems.py", line 260, in get_directory
return self.filesystem.get(from_path, local_path, recursive=True)
File "C:\Users\BStefansen\.virtualenvs\lbx-broadband-pipeline-4k_4F-H8\lib\site-packages\fsspec\spec.py", line 801, in get
self.get_file(rpath, lpath, **kwargs)
File "C:\Users\BStefansen\.virtualenvs\lbx-broadband-pipeline-4k_4F-H8\lib\site-packages\fsspec\spec.py", line 769, in get_file
outfile = open(lpath, "wb")
FileNotFoundError: [Errno 2] No such file or directory: 'C:/Users/BSTEFA~1/AppData/Local/Temp/tmp5t7vj96aprefect/aurora\\aurora_constants.py'
Expectation
I would expect the prefect engine to use s3 file paths for pulling down the flow code, but it seems to be using local file paths. Is this an issue with my deployment/flow setup, or is this a bug?
Environment
• Windows 10
• Python 3.10.5
• Prefect 2.2.0Bianca Hoch
08/25/2022, 7:06 PMBlake Stefansen
08/25/2022, 7:08 PMPaco Ibañez
08/25/2022, 9:12 PMRobin Weiß
08/26/2022, 10:05 AMstorage_block = GCS.load("dev")
infrastructure_block = KubernetesJob.load("dev")
deployment = Deployment.build_from_flow(
flow=orion_flow,
name="sample-deployment",
version=1,
work_queue_name="kubernetes",
storage=storage_block,
infrastructure=infrastructure_block,
)
deployment.apply()
But when I inspect the deployment that was created, the storage does not seem to be configured at all.
Would be super happy about any hints whatsoever :)Jeff Hale
08/26/2022, 10:54 AMRobin Weiß
08/26/2022, 11:27 AMPaco Ibañez
08/26/2022, 2:56 PM