To add arbitrary variables, such as a link to a webpage with a runbook, to a flow deployment in Prefect, you can make use of the parameters feature. Do the following:
1. Navigate to the details page for your deployment.
2. Select "Edit" from the commands menu.
3. Under the Parameters section, select "Custom" and provide the custom values for any editable deployment fields.
This would let you include any necessary information or variables you want to be accessible during flow runs. Note that once you set a parameter value, it will be used for all future flow runs based on that deployment.
For more detailed information, refer to the
Prefect documentation on block-based deployments.
Regarding handling flow failures:
- Prefect Cloud has a feature called error summaries powered by Marvin AI to help you triage your failed runs quickly.
To add a link to a runbook as a parameter or within your flow's logging mechanism, you could include the URL as a flow or task parameter, and ensure your flow's failure handling logic includes a task to log this parameter, making it visible for users to access when investigating a failed flow run.
For a more detailed guide on handling failures, visit
Prefect's blog on introducing error summaries.