PrefectHQ / prefect

Prefect is a workflow orchestration framework for building resilient data pipelines in Python.
https://prefect.io
Apache License 2.0
15.32k stars 1.5k forks source link

result_storage need Callable #14396

Open jsshizhan opened 3 days ago

jsshizhan commented 3 days ago

First check

Bug summary

@flow can not use result_storage with function

Reproduction

@flow(flow_run_name="subflow",persist_result=True,result_storage=remoteFileSystem())
async def subflow():

def remoteFileSystem():
    remote_file_system_block = RemoteFileSystem.load("minio-block")
    return remote_file_system_block

Error

No response

Versions (prefect version output)

prefect version
Version:             3.0.0rc9
API version:         0.8.4
Python version:      3.12.3
Git commit:          b75631a7
Built:               Mon, Jun 24, 2024 5:50 PM
OS/Arch:             darwin/x86_64
Profile:             default
Server type:         server
Pydantic version:    2.7.3

Additional context

No response

WillRaphaelson commented 3 days ago

@jsshizhan can you please share the error that you get when you run this code?