Hi, I have a master flow which triggers several ch...
# prefect-server
Hi, I have a master flow which triggers several child flows (using FlowRunTask). When looking at the logs of a specific run of the master flow I can see it triggered the child flows, but I can’t get from there to the child logs. Is there a way to enable it? In other words, I want to know if a flow was triggered by another flow or by itself. Is there a way to know that using the UI? Thanks!
Hi @Hagai Arad - great question. Let me check with the team to see if anyone has any ideas for this.
@Jenny Thanks!
Hi @Hagai Arad - this is something we've been discussing as a team. I'll open an issue and share for you to add to. In the meantime, I just tried this:
Copy code
from prefect.tasks.prefect.flow_run import FlowRunTask
from prefect import task, Flow, Parameter, prefect

kickoff_task = FlowRunTask(project_name="Jenny", flow_name="Pause:Resume", run_name="triggered_by_flowName")

    logger = prefect.context.get("logger")

with Flow(name='flowName') as flow:
It's not clickable etc but that should log the flow run id of the flow run you kick off (which you can enter in the search bar to get details of)
And if you want to be able to se if a run was triggered by another flow, we've added the run_name argument to the flowRunTask so you can give flow runs names that indicate how they were kicked off. (I've added an example to my snippet above)
@Hagai Arad I've opened a feature request here: https://github.com/PrefectHQ/ui/issues/263 Please add any comments or details you'd like to see.
@Jenny seems good, thanks for the quick response and action!
👍 1
@Anna Geller (old account) FYI. In case you’ll want to use it as well 🙂
thanks a lot, @Hagai Arad and @Jenny! it would be really useful!
👍 1
🤓 1