https://prefect.io logo
#prefect-community
Title
# prefect-community
s

Sean Turner

10/07/2022, 5:35 PM
What happens when a
flow
(
foo
) is running and a new deployment is created that changes the flow code that
foo
was executing. QUESTION 1: Would
foo
continue to execute and ignore the new deployment? Also, what happens if
foo
intends to trigger a
sub flow
(
bar
), but a new deployment is created that changes the flow code that
bar
would execute? So the timeline is a.
flow
foo
is triggered b.
sub flow
bar
is updated (sub flow id changes from
123
to
456
) c.
foo
gets to the point in execution where
bar
is called. QUESTION 2: Would
foo
trigger the newly updated
bar
code
456
? Or would
foo
ignore the change to
sub flow
bar
and trigger
123
as
foo
was triggered before
bar
was updated?
1
n

Nate

10/07/2022, 5:53 PM
Question 1: Yes, prefect pulls your flow code at the beginning of the flow run, and would not stop to pull updated flow code during the flow run. foo would not begin executing if it did not already have access to bar's source code. Question 2: foo would trigger whichever version of bar it had when the flow code was pulled originally
🙌 1
however, if
bar
was a standalone deployment and
foo
was creating flow runs of
bar
via the client (or the new utility available in 2.5), and
bar
happened to be updated during a run of
foo
, then
foo
would call the newest
bar
(i.e.
foo
would always call the newest
bar
via the client)
s

Sean Turner

10/07/2022, 5:59 PM
Ah, thank you for clarifying!
bar
would be a stand alone deployment probably because we want it to be running a different
infra block
on EKS so that the docker image is different
👍 1