https://prefect.io logo
Title
h

haf

03/09/2021, 10:23 AM
I was hoping to get a bit of help: in what order to run
python
vs
prefect register flow
vs triggering flows via the UI? And if I change a flow, do I register it again? Is it always that I have to change the python code when I change the runtime of a flow (by doing
flow.run()
or
flow.register()
or is this something that can be inferred by the agent running the flow?
m

Mariia Kerimova

03/09/2021, 1:49 PM
Hello! 👋 In order to run flow you can do following steps: 1. Write your flow. 2. Register your flow with your backend by running
python <flow_file>
or
prefect register flow --file <file_path> --project <project_name>
3. Make sure your agent is running with right labels. Trigger running the flow by using UI or CLI command
prefect run flow --name <flow_name> --project <project_name>
And yes, if you will change the flow, you will have to register it again to update the version of your flow. And yes, you’ll have to slightly modify the flow, to indicate a new desired runtime, and if necessary start a new agent.
👀 1
👋 1
h

haf

03/09/2021, 4:37 PM
So I can't just have a single flow file specifying the flow in a way that can be run both with
python flow.py
and
prefect register flow ...
? Examples: • I don't seem to need the Docker storage when running it locally • I don't want to run the flow when registering it • I want to only have Slack notifications in prod