Jason Carter

07/24/2020, 5:44 PM
Hello, I have another "quick" question branching from my previous issue. 1. If I make a change to my file say
do I have to run
in order to get it to register the change? (
is in my py file) 2. I'm now seeing my flow in the UI but when I try to run it via the UI (as a one off run) it goes into "scheduled to run" but late and never runs (i just mark as cancel after 3mins).
import prefect
from prefect import task, Flow

def hello_task():
    logger = prefect.context.get("logger")
    <|>("Hello, Cloud!")

flow = Flow("hello-flow", tasks=[hello_task])


Matt Allen

07/24/2020, 5:45 PM
is what builds the updated docker image and tells the prefect agent about the new version of the flow, so yeah it's required every time the code changes
My plan is to run that script from within gitlabci on every build, it's basically the "deploy" step


07/24/2020, 5:50 PM
Hi @Jason Carter - @Matt Allen is correct, when your code changes you'll need to let Prefect know. The exception to this is when using file-based storage, which allows non-structural code to change between runs without re-registering the flow. You can read more about that here:
As for the late runs, you'll need to have an Agent configured with the same labels as your flow, to make sure it picks up scheduled runs.

Jason Carter

07/24/2020, 5:56 PM
Thanks @Matt Allen and @nicholas the deploy script as a step makes sense. And thanks for the info on the file based storage I'll read up on that. As for the agent, all i did was start the docker agent so that must be the issue. I'll look into the labels. Just an FYI - I think a # step flow for a hello world would be helpful. It seems like everything content wise is documented but no TLDR section to get a flow running in x steps (but perhaps I missed it)


07/24/2020, 5:58 PM
Totally agreed @Jason Carter - it's something we're actively working on and should have some good stuff soon 😄
👍🏾 1