<@ULVA73B9P> after upgrading prefect versions our ...
# ask-marvin
k
@Marvin after upgrading prefect versions our slack notifications are not being parsed properly. Fix the below action body given your knowledge of the latest prefect release
Copy code
Flow run {{ flow.name }}/{{ flow_run.name }} entered state `{{ flow_run.state.name }}` at {{ flow_run.state.timestamp }}.
Flow ID: {{ flow_run.flow_id }}
Flow run ID: {{ flow_run.id }}
Flow run URL: {{ flow_run|ui_url }}
State message: {{ flow_run.state.message }}
m
It seems your Slack notification template needs a little adjustment. Based on recent updates and documentation, make sure your Jinja2 template is correctly structured. Here's a revised version:
Copy code
jinja2
Flow run {{ flow.name }}/{{ flow_run.name }} entered state `{{ flow_run.state.name }}` at {{ flow_run.state.timestamp }}.
Flow ID: {{ flow_run.flow_id }}
Flow run ID: {{ flow_run.id }}
Flow run URL: {{ flow_run.ui_url }}
State message: {{ flow_run.state.message }}
The key change here is using
{{ flow_run.ui_url }}
instead of
{{ flow_run|ui_url }}
for the flow run URL. Ensure that your Jinja2 template outputs valid JSON as needed for Slack notifications. You can refer to the Prefect documentation for webhook triggers and state management for more details. If there are any specific errors or issues, feel free to share them for further assistance.
n
hi @KG - please feel free to share what you're seeing! marvin probably won't be of too much help on this
k
Used to be formatted properly, after some upgrades yesterday (prefect python library version, worker infra version) message is missing key components yesterday:
Copy code
Prefect Webhook APP  11:34 AM

Prefect flow run failed
Flow run load-orientation-quiz-survey-responses/invaluable-sloth entered state Failed at 2025-03-13 16:31:07.269203+00:00.
Flow ID: f31b7fc3-d64e-498a-b3b3-e51d3a16d8ee
Flow run ID: f5a5598c-00a5-4c96-bc4b-c2e474d39edd
Flow run URL: <redacted>
State message: Flow run encountered an exception: TypeError: not all arguments converted during string formatting
Prefect Notifications | Today at 11:34 AM
Now:
Copy code
Prefect flow run failed
Flow run / entered state `` at .
Flow ID:
Flow run ID:
Flow run URL: None
State message:
Prefect Notifications | Today at 12:06 PM
No prob - its an easy fix just wanted to see if Marvin had big changes since I last used 🙂
n
interesting - that's pretty odd. i would be surprised if the formatting logic has changed at all recently so I wonder if it's about the automation system. I assume you're using cloud?
✅ 1
k
Yep we're using Cloud. I'll take a deeper look today since its still happening