prefect
prefect copied to clipboard
Add `flow_run_url` to flow run notification template variables
First check
- [X] I added a descriptive title to this issue.
- [X] I used the GitHub search to find a similar request and didn't find it.
- [X] I searched the Prefect documentation for this feature.
Prefect Version
2.x
Describe the current behavior
Flow runs notifications currently allow the following fields to be provided as template variables
FLOW_RUN_NOTIFICATION_TEMPLATE_KWARGS = [
"flow_run_notification_policy_id",
"flow_id",
"flow_name",
"flow_run_url",
"flow_run_id",
"flow_run_name",
"flow_run_parameters",
"flow_run_state_type",
"flow_run_state_name",
"flow_run_state_timestamp",
"flow_run_state_message",
]
Describe the proposed behavior
Add flow_run_url
to the allowed template variables.
The FlowRunNotifications
service will be responsible for figuring out the correct flow run url and adding it to the templated variables.
Example Use
If my flow run fails, I would like a slack notification with a link to the flow run ui page.
Additional context
No response