Closed jsshizhan closed 2 days ago
Hi @jsshizhan - thanks for the issue and the question! If I understand your question correctly you want to know how to get access to the result when running run_deployment? Your example is close but you'll probably find it easier to return your result directly instead of trying to add it to the state. You can see more examples and an explanation of returning values in the docs here: https://docs-3.prefect.io/3.0rc/develop/manage-states#returned-values
A side note that this will return the result location rather than the result itself. You might also want to look into using a variable - https://docs-3.prefect.io/3.0rc/develop/variables#manage-variables
Looking into your question did make me realize that we could do with more documentation on run_deployment - I've added an issue for that here
As a side note, I had to do some reworking to get your MRE to run because you referenced tasks that weren't actually available. Here's a good explanation of what we are looking for when running an MRE - https://stackoverflow.com/help/minimal-reproducible-example
I'm going to close this issue as I don't see this as a bug. Please do open a new issue or re-open this one if you feel I've not actually addressed your question.
First check
Bug summary
parent flow run machine A,with a subflow run_deployment in machine B,how to get suflow return value in parent flow? flowrun.state has no return value
Reproduction
Error
No response
Versions (
prefect version
output)Additional context
No response