Klashe
11/02/2024, 11:02 PM{% if flow_run.state.name == "Completed" %}:large_green_circle:{% endif %}{{ flow_run.state.name }}
Timestamp: {{ flow_run.state.timestamp.strftime("%Y-%b-%d %I:%M %p") }} America/Phoenix
Flow ID: {{ flow_run.flow_id }}
Flow Run ID: {{ flow_run.id }}
Flow Run URL: {{ flow_run|ui_url }}/flow-runs/flow-run/{{ flow_run.flow_id }}
{% if flow_run.state.message %}
State Message: {{ flow_run.state.message }}
{% endif %}Marvin
11/02/2024, 11:03 PM{{ flow_run|ui_url }}/flow-runs/flow-run/{{ flow_run.flow_id }}
appears to incorrectly conjoin flow run IDs and paths. To construct the correct UI URL using the Jinja template, you should be using the flow_run
object with its appropriate attributes or methods directly provided by Prefect, often encapsulated in a helper function or a built-in filter specifically for UI URLs.
Here’s a corrected approach to generate the URL, based on common patterns for accessing Prefect Cloud resources:
- Make sure you use the flow_run.id
directly, as this is the primary identifier for a flow run.
- Use any Prefect helper functions, if available or documented, to access the URL.
Although I couldn't find a specific documented filter or function in the Prefect 3.x documentation for directly accessing the UI URL, typical access involves constructing the URL with the base domain of your Prefect Cloud instance followed by the specific identifiers for the flow run. Here’s a suggested structure:
Flow Run URL: <https://cloud.prefect.io/<your-workspace>/flow-runs/flow-run/{{> flow_run.id }}
Replace <your-workspace>
with your actual Prefect workspace.
Since detailed documentation or issues directly addressing this were not found, I recommend checking your Prefect Cloud configuration or consulting the broader user community if issues persist.
For more detailed actions and examples around automations and Jinja templating in Prefect 3.x, consider visiting the documentation here on automations or checking your connection to Prefect Cloud as described here.Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.
Powered by