I have a problem where a Flow Run went from `Sched...
# ask-community
t
I have a problem where a Flow Run went from
Scheduled
to
Cancelled
without pressing cancel in the UI. By the looks of the following query the Flow Run was cancelled because a new version of the Flow was released (which archived the old flow). Is this expected behavior?
a
Could you move the code blocks to the thread here to keep the main channel clean?
This is indeed intended behavior because the flow run was scheduled, but at the time when the flow run would move to the Running state, the flow was already archived due to the presence of a new version. Atm you can’t simultaneously run current and archived versions of a flow, that’s why scheduled runs of archived flow versions are cancelled
t
The query:
{
flow_run(where: {id: {_eq: "d5e67e75-ae88-4da2-8d70-d4084c131d3d"}}) {
id
agent_id
name
state
states {
id
message
timestamp
updated
start_time
}
}
}
yields:
{
"data": {
"flow_run": [
{
"id": "d5e67e75-ae88-4da2-8d70-d4084c131d3d",
"agent_id": null,
"name": "obedient-ibis",
"state": "Cancelled",
"states": [
{
"id": "09be78bf-6ba8-432e-a8ae-bc2c10b1d8cb",
"message": "Flow 4dbab6ee-ff04-4fca-90b8-67633eddf45b was archived.",
"timestamp": "2022-01-04T12:13:33.009525+00:00",
"updated": "2022-01-04T12:13:33.018213+00:00",
"start_time": null
},
{
"id": "616cdbc5-4af3-467a-b714-0e74880f7ff7",
"message": "Flow run scheduled.",
"timestamp": "2022-01-04T12:13:28.802805+00:00",
"updated": "2022-01-04T12:13:28.806278+00:00",
"start_time": "2022-01-04T12:13:28.753343+00:00"
}
]
}
]
}
}
🙏 1
@Anna Geller I see. So in case the flow had made it into the running state before the new version was released the flow run would have continued?
a
I believe so, but I’m not 100% sure if this flow run would be able to finish. The main point is: as soon as a new version is available, all scheduled flow runs of old versions are immediately cancelled
t
@Anna Geller Ok. Thank you for the help!
🙌 1