<@ULVA73B9P> How can I retry a specific subflow in...
# ask-marvin
d
@Marvin How can I retry a specific subflow in the Prefect Dashboard? I don't care about the parent run or any of its sibling subflows.
m
Retrying a specific subflow in the Prefect Dashboard is not directly supported as a built-in feature in Prefect 3.x. However, you can manually trigger a retry by taking the following steps: 1. Identify the Subflow: In the Prefect Dashboard, locate the specific subflow you want to retry. Ensure you have the flow run ID for this subflow. 2. Manually Trigger a Retry: Use the Prefect CLI or API to create a new run of the subflow. You can achieve this by using the
prefect run
command and specifying the flow run ID. This approach effectively acts as a "retry" by creating a new instance of the subflow. 3. Use the API: If you prefer a programmatic approach, you can use the Prefect Python client to create a new flow run for the subflow. This can be done by calling the
create_flow_run
method with the appropriate parameters. For more detailed guidance, you might want to explore the Prefect documentation about pausing and resuming flows, which might offer additional insights into handling run states. If you need more specific code examples or further assistance, feel free to ask!