Dear Prefect Community, I am getting the following...
# prefect-community
x
Dear Prefect Community, I am getting the following error in agent.log (log for the dedicated agent) and I can't run the scheduled job. I already have a local storage system and used the code to load it inside my flow. prepared_infrastructure = infrastructure_block.prepare_for_flow_run(flow_run) AttributeError: 'LocalFileSystem' object has no attribute 'prepare_for_flow_run' An exception occurred.
m
Hey @Xavier Babu would you be able to provide a simple example of the flow your running and how you have the block configured?
x
Thanks, Mason for your prompt reply. We are deploying and scheduling a workflow using REST APIs and agent is crashing while processing that workflow. It was working fine with Prefect Orion 2.0 versions, we updated with 2.4 last week and it messed up the entire application we have developed. If you can point me to a doc where we have REST API Tutorial with Prefect Orion 2.4, that would be great. BTW, we are not using cloud and using only Local Linux servers and storage.
We are using Prefect Orion from the first beta version.
Especially help doc on how to generate "Process" block id and use it for every REST API Call would be great.
m
Hey @Xavier Babu this is the rest API reference in our docs https://docs.prefect.io/api-ref/rest-api/#/, I’d also strongly encourage you to update the prefect version there have been a large number of changes to how deployments/infrastructure work in recent versions This discourse covers the gist of what deployments/infrastructure blocks would look like https://discourse.prefect.io/t/overview-of-infrastructure-blocks-in-cli-based-deployments/1574 As for generating a process block in code this is a basic example, generally speaking though you can specify all this in a deployment command or from the UI (orion or cloud) for a flow run and call a flow run from that deployment if that's the pattern you're going for:
process_infra = Process(env={"key": "val"}).save(name="test")
x
Thanks, let me look. Have a great weekend.